0

We have a requirement to show two quote to customer so, what we did is we have created custom visualforce page for custom users and standard view for standard user which is absolutely working as expected but the problem is :

Standard Create PDF button is not working as expected even i have created new custom detail page button with the following code but the result is same.

Custom detail page button code :

var pdfOverlay = QuotePDFPreview.quotePDFObjs['quotePDFOverlay'];
pdfOverlay.dialog.buttonContents = '<input value=\"Save to Quote" class=\"btn\" name=\"save\" onclick=\"QuotePDFPreview.getQuotePDFObject(\'quotePDFOverlay\').savePDF(\'0\',\'0\');\" title=\"Save to Quote\" type=\"button\" /><input value=\"Save and Email Quote\"  class=\"btn\" name=\"saveAndEmail\" onclick=\"QuotePDFPreview.getQuotePDFObject(\'quotePDFOverlay\').savePDF(\'1\');\" title=\"Save and Email Quote\" type=\"button\" /><input value=\"Cancel\"  class=\"btn\" name=\"cancel\" onclick=\"QuotePDFPreview.getQuotePDFObject(\'quotePDFOverlay\').close();\" title=\"Cancel\" type=\"button\" />';
pdfOverlay.summlid = '0EH36000000ysak';
pdfOverlay.setSavable(true);
pdfOverlay.setContents('/quote/quoteTemplateDataViewer.apexp?id=' +"{!Quote.Id}",'/quote/quoteTemplateHeaderData.apexp?id='+"{!Quote.Id}");
pdfOverlay.display();

Result is loading n loading can anyone help me out please

enter image description here

0

Have you looked at the fields on your custom page and compared them to the fields on the template used for the standard quote template? I suspect you'll find they're not the same which is likely the source of your issues. You may need to create a custom template to match your custom page.

I've found that using the Free Salesforce App Exchange Package Simple Quote/Invoice/Order allows you to easily create new controllers and pages by using the existing templates and controller as a "guide".

  • did you mean that i have page (QuoteDetail) fields and custom quote template fields are not same ? correct me if i'm wrong – Nail David Aug 23 '17 at 13:36
  • That's what it sounds like - they're not the same as what's on your existing template. – crmprogdev Aug 23 '17 at 14:22
  • Ok but the thing is it's not working when i override view link as my custom visualforce page. it's working fine when i leave view as it is (No override), that's really strange thing for me and what i feel is it's just a matter of URL so create pdf always takes /QuoteID and if i override it takes /apex/custompage?id=QuoteID. please suggest !! – Nail David Aug 24 '17 at 6:15
  • Yes, it would be to a custom page if you create a custom template. I believe some of this is explained in the help. – crmprogdev Aug 24 '17 at 12:13
  • It's not working still so, i did turn into alternate solution with it. thank you for giving your time :) – Nail David Aug 24 '17 at 13:19

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.