Add Generate Documents button to Salesforce views for Lightning Designer

If the Generate Document button has not been added to any of the Salesforce views, or was not previously set up in Classic, then the button needs to be added to Lightning Designer. This section covers how to add the Generate Document button using the Lightning Designer.

Add Generate Document Button

There are multiple stages to adding a Generate Document button in Lighting Designer:

  • Copy the Visaulforce page sample provided below

  • Create a Visualforce Page

  • Create a new Generate Document button

  • Add the button to the page layout

There is also some additional information you can configure once the button has been set up and added.

Create a new Visualforce page:

  1. Navigate to Salesforce setup.

  2. Use the Quick Find search function to find "Visualforce Pages".

  3. Click New.

  4. Create a unique name “MassLightning{object}”.

  5. Click the Available for Lightning Experience checkbox.

  6. Paste the sample into the ‘Visualforce Markup’ Section.

  7. Add the desired object API name for the ‘standardController’.

  8. Click Save.

Create a New Generate Document button:

  1. Navigate to Salesforce Setup.

  2. Select Object from Object Manager menu.

  3. Select Button, Links, and Actions section.

  4. Click New Button or Link.

  5. Create a name for the label in the Label Name field.

  6. In the Display Type field, select List Button with Display Checkboxes.

  7. In the Behavior field pick the desired behavior.

  8. In the Content Source field select Visualforce Page

  9. Select the created Visualforce Page from the list.

  10. Click Save.

Add Button to Layout

  1. Navigate to Salesforce Setup.

  2. Select Object from Object Manager menu.

  3. Select Search Layouts or Search Layouts for Salesforce Classic section.

  4. Click Edit on the List View Layout.

Or

  1. Select the newly created button from the Available Buttons list.

  2. Add it to the Selected Buttons list.

  3. Click Save.