Create Mass button in Lightning

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 box to search for Visualforce Pages .

  3. Click New.

  4. Create a unique name in the format “MassLightning{object}”, for example 'MassLightningOpp'.

  5. Select Available for Lightning Experience.

  6. Paste the sample above into the Visualforce Markup section.

  7. Add the desired object API name for the ‘standardController’. For example, <apex:page standardController="Opportunity" recordSetVar="units">

  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.

  4. Click New Button or Link.

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

  6. Under Display Type, select List Button with Display Checkboxes.

  7. In Behavior, pick the desired behavior.

  8. In Content Source, 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.