function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
turbo2ohturbo2oh 

replicate quote pdf preview

I'm trying remove the delete functionality from the quote pdf preview. To do this I'm trying to recreate the functionality in a VF page. I'm having a hard time recreating the preview functionality. I've found this function /jslibrary/1320195877000/Quote.js but not sure if thats what I should be using or what arguments its expecting.

 

I've also tried using this:

 javascript: var pdfOverlay = QuotePDFPreview.quotePDFObjs['quotePDFOverlay2'];pdfOverlay.dialog.buttonContents = '<input value=\"Email Quote\"  class=\"btn\" name=\"emailQuote\" onclick=\"javascript:navigateToUrl(\'/_ui/core/email/author/EmailAuthor?p2_lkid=00190000003iCaY&rtype=003&p3_lkid=0Q0900000004H5G&doc_id=0QD900000004CTm&retURL=%2F0Q0900000004H5G\',\'RELATED_LIST\');\" title=\"Email Quote\" type=\"button\" /><input value=\" Close \"  class=\"btn\" name=\"close\" onclick=\"QuotePDFPreview.quotePDFObjs[\'quotePDFOverlay2\'].close();\" title=\"Close\" type=\"button\" />';
pdfOverlay.setContents('/servlet/servlet.FileDownload?file=0QD900000004CTm');
pdfOverlay.display();
"

 Unfortunately I'm getting  a jscript error Cannot read property 'dialog' of undefined

 

Any ideas? Has anyone done this before?

Ispita_NavatarIspita_Navatar

Hi,        

You can replace all the special characters like :- ('&quot') in the string to create an pdf.

Refer to the following snippet:-

 String dipslaytable=dipslaytable.replaceAll('&lt;','<').replaceAll('&quot;','"').replaceAll('&gt;','>');

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

 

 

 

 

turbo2ohturbo2oh

Well with the exception of the first : after javascript, not sure how that got in there I belive all the characters are using ASCII versions because this is an inline javascript statement within a VF page. Wouldn't having characters like '<' mess up the html formatting?


Also are you suggesting that this solution will work its just a matter of my formatting?

SoleesSolees

Hi, did you make this to work?

 

cheers