You need to sign in to do that
Don't have an account?
Override Create PDF button to show a popup on Quote Detail Page
Hello ,
I have an approval process on Quote that locks the Quote record. While the record is locked/not approved, we want to restrict user to perform actions on Quote like Create PDF via Create PDF button on quote detail page.
On looking at Create PDF page, looks like it is making a function call and the URL of the page is not accessible to us which we could have used in custom vfp page and redirected to standard page reference if the record is approved else
show a popup.
Is it possible? I have researched quite a bit but did not find any clue. Its a critical requirement for us hence in case anybody has any idea please let me know
Thanks
Hello
This is an important requirement for us. In case anybody has an idea on this and knows how we can override create pdf button on quote detail page and then in the custom apex class redirect to the standard create pdf popup on some condition.
thanks
anjs2976
Hi,
It is redirecting to sum page when we click on the page
with QuoteId and Summid as two parameter
final pdf URL looks like as follw and it is accessible
https://INSTANCE.salesforce.com/quote/quoteTemplateDataViewer.apexp?id=0Q0900000004H5G&summlid=0EH90000000H7dO
I didnt find any detail about Summlid parameter , id is Quote id
Here is the Javascript executed after clicking on Create PDF button
Basically this is some modal dioloug box with some parameter provided,
I am planning to embed this script in some S-control and hitting S-Control in place of create Pdf
hope this will help you
thanks,
Bala
This is the main Js file for QuotePDf functionality
Thanks,
Bala
Thanks Bala. Yeah even I could not get summlid param earlier.
The pdf is rendered but how to get the exact same popup with the buttons Save to Quote, Save and Email Quote etc .
The requitement is that if some condition fails then we need to give a popup saying that Create PDF is not possible, if condition satisifies then display the standard create pdf page.
thanks
anjali
Anjali,
I am trying to add entire script in S-Control and trying to call it on Button Click,
Because this is the only solution that I can see.
Could you please do some POC on that, I am plannig to work on this topic on weekend
Thanks,
Bala
Anjali,
This is the script code to show buttons on Popup
Again I get it from same source
Thanks,
Bala
the parameter summlid is the id of the PDF template
So how did this go? I'm trying to replicate the View PDF button using the jslibrary/1280952852000/Quote.js Below the code i have so far, but it's not workIng. Any suggestions?
I'm basically trying to replicate the Quote PDFs related list on the Quote, but remove the delete button. I'm just stuck at the preview functionality:
<apex:page standardController="Quote" showHeader="false" sidebar="fasle">
<apex:includeScript value="/jslibrary/1280952852000/Quote.js"/>
<apex:form >
<apex:pageBlock title="Quote PDFs" >
<apex:pageBlockTable value="{!Quote.QuoteDocuments}" var="oli">
<apex:column headerValue="Action">
<b><apex:outputLink value="https://tapp0.salesforce.com/_ui/core/email/author/EmailAuthor?p2_lkid={!oli.Quote.Opportunity.Account.Id}&rtype=003&p3_lkid={!oli.Quote.Id}&doc_id={!oli.Id}&retURL=%2F{!oli.Quote.Id}" target="_blank">Email</apex:outputLink></b>
</apex:column>
<apex:column >
<apex:outputLink value="/jslibrary/1280952852000/Quote.js" OnClick="QuotePDFPreview()"> View </apex:outputLink>
</apex:column>
<apex:column value="{!oli.Name}"/>
<apex:column value="{!oli.Discount}"/>
<apex:column value="{!oli.GrandTotal}"/>
<apex:column value="{!oli.CreatedBy.Name}"/>
<apex:column value="{!oli.CreatedDate}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
*bump*
Did you end up finding a solution to this? I'm hot on the heels of decoding all of the JS behind this magical button, but am stuck at a generic XML / HTTP response from SF:
Quite frustrating. Let me know if you figured it out - or if not, maybe we can share notes.
The only solution I found was to bring the PDF view in another window, I was not able to replicate the PDF Overlay. I was able to create an acceptable solution to mimic the QuotePDF's related list, but without the delete button.
I know this post is year old, however I was wondering how you were able to replicate the Quote PDFs related list to store Documents on a custom object. Thanks for your time, and hope to hear from you.