• Amit Tekale
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

On the SF Quote Page, I see that I can override Create PDF to show my own VIsualForce page. I can also "RenderAs" a PDF. This works as expected.

 

But how can I show my own VisualForce page in the pdfOverlay that is shown when the user clicks "Create PDF" when there is no override. In this case, a standard template is served up on the "pdfOverlay" window, with default buttons (Save to Quote, Save and Email Quote, and Cancel).

 

I want my Visualforce quote document to appear in that window, using those same buttons.

 

Basically, I want to use my own template via a VIsualforce page, rather than the more restrictive Templates available to us via the standard quote templates. The template layout options just don't seem to permit the coplexity I need. For example, it is not possible (I think) to create multi-page Terms & Conditions, and lengthy paragraph language to develop a longer form quotation to the customer.

 

Is there a simple way to reuse that PDF overlay with my own VIsualForce PDF, including the existing "Save to Quote" (etc.) buttons in the PDF Overlay ?

 

This would save me lots of time.

 

P.S. The SF Quote page's HTML source shows the following, which is why I thought pdfOverlay had some relevance:

 

HTML Snippet From SF Quote Page:

 

 

<input value="Create PDF"  class="btn" title="Create PDF" name="createpdf" onclick="null
 var pdfOverlay = QuotePDFPreview.quotePDFObjs['quotePDFOverlay'];pdfOverlay.dialog.buttonContents = '&lt;input value=\&quot;Save to Quote\&quot;  class=\&quot;btn\&quot; name=\&quot;save\&quot; onclick=\&quot;QuotePDFPreview.getQuotePDFObject(\'quotePDFOverlay\').savePDF(\'0\',\'0\');\&quot; title=\&quot;Save to Quote\&quot; type=\&quot;button\&quot; /&gt;&lt;input value=\&quot;Save and Email Quote\&quot;  class=\&quot;btn\&quot; name=\&quot;saveAndEmail\&quot; onclick=\&quot;QuotePDFPreview.getQuotePDFObject(\'quotePDFOverlay\').savePDF(\'1\');\&quot; title=\&quot;Save and Email Quote\&quot; type=\&quot;button\&quot; /&gt;&lt;input value=\&quot;Cancel\&quot;  class=\&quot;btn\&quot; name=\&quot;cancel\&quot; onclick=\&quot;QuotePDFPreview.getQuotePDFObject(\'quotePDFOverlay\').close();\&quot; title=\&quot;Cancel\&quot; type=\&quot;button\&quot; /&gt;';
pdfOverlay.summlid = '0EHE0000000PCKI';
pdfOverlay.setSavable(true);
pdfOverlay.setContents('/quote/quoteTemplateDataViewer.apexp?id=0Q0E0000000TNLo','/quote/quoteTemplateHeaderData.apexp?id=0Q0E0000000TNLo');
pdfOverlay.display();
" type="button" />

Any advice to get to this solution? 

 

Thanks, Matt