1

I have a custom OnClick JavaScript link that is used for Quote functionality.  The OnClick JavaScript will not work with Lightning. 

How should I migrate it to lightning on click of the link a popout is generated which contains a PDF. the javascript code is below

var pdfOverlay = QuotePDFPreview.quotePDFObjs['quotePDFOverlay']; 
pdfOverlay.summlid = '{!$Setup.QuoteLinks__c.Institution_Quote_Detail_Template_ID__c}';pdfOverlay.setSavable(true); 


pdfOverlay.dialog.buttonContents = 
"<input value=Save class=btn onclick=QuotePDFPreview.getQuotePDFObject(&apos;quotePDFOverlay&apos;).savePDF(&apos;0&apos;,&apos;0&apos;); type='button' />&nbsp;&nbsp;<input value=Email class=btn onclick=QuotePDFPreview.getQuotePDFObject(&apos;quotePDFOverlay&apos;).savePDF(&apos;1&apos;); type='button' />"; 


pdfOverlay.setContents('/quote/quoteTemplateDataViewer.apexp?id={!Quote.Id}','/quote/quoteTemplateHeaderData.apexp?id={!Quote.Id}'); 
pdfOverlay.display();
  • You cant migrate the button, you need to create a lightning component with the same functionality as your button – Torsen Apr 12 '17 at 7:23
  • @Torsen I am very new to this. can you please help ? – Apoorv Apr 12 '17 at 7:24
  • @Torsen I know that it can't migrate but how can I achieve the above mentioned functionality in lightning ? Do u really think I need to create a lighting component? – Apoorv Apr 12 '17 at 7:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.