PDF Generator

Create PDF allows end users to preview the PDF using the templates that the admin has made available & save it to SFDC record under Files and Note & Attachment related lists.

Notes:

By default all templates are shown to the end users but if you want to show relevant templates to the end users based on business rule, check this section on restricting/filtering templates for end users.

Below section walks through the configuration required for previewing & saving the PDFs.

BUTTON CONFIGURATION


As part of the app we have provided a custom button “Create PDF” for Lead, QuoteOpportunity and Order objects by default. For other objects, create a custom button as per below details.

Create new button from “Button, Links and Actions” option on object setup page and fill the details as shown as below. This is the generic URL for the button where My_Object__c needs to be replaced with the object API name.

URL: /apex/sfcloud2__QuotePDF_Save?id={!My_Object__c.Id}&action=save

For example, if it’s standard Contact object, URL will be –

/apex/sfcloud2__QuotePDF_Save?id={!Contact.Id}&action=save

If it’s custom object with API Name Service_Object__c, URL will be –

/apex/sfcloud2__QuotePDF_Save?id={!Service_Order__c.Id}&action=save

Next step is to modify the object page layout where PDF is to be generated to add the buttons.

For Classic view, add this button to custom button area in the page layout-

For Lightning view, please add the buttons to Mobile and Lightning Experience Actions –

END USER EXPERIENCE


Here are the steps end user (Sales Rep) will follow to preview and save PDF.

1. User clicks on Create PDF button.

2. User is redirected to PDF Preview page which shows the record name on top-left and list of available templates in the drop-down list. Select a template to preview the PDF. User can then save the PDF back to record using “Save PDF” button

Note: If only 1 template is available, it will be selected by default.

3. PDFs are stored under “Files” and “Notes & Attachments” section of the record. For Quote object, the PDF is also stored under standard “Quote PDFs” section.