As described in Add the Action Grid to Leads, Accounts and Contacts, the Action Grid can readily be added to list views of Accounts, Contacts and Leads. To add the Action Grid to other Objects, you first need to create a Visualforce page and custom button for these objects, and then add the custom button to the objects' list views.
Repeat the steps below for each object where you want to use the Action Grid.
Create a Visualforce page
Create a Visualforce page for the Action Grid as follows:
- Go to the Salesforce Setup.
- Find Visualforce Pages and open it.
- Click New.
- For Label, enter a label to identify the Action Grid Visualforce page with, for example Action Grid.
- For Name, enter a name to identify the page in the API. We recommend including the Object name, as you might be creating several Visualforce pages for different objects. For example, if you are creating a Visualforce page and custom button for Cases, enter the name dapCaseActionGrid.
- Select Available for Lightning Experience, Experience Builder sites, and the mobile app.
- Leave Require CSRF protection on GET requests unticked.
- In the Visualforce Markup text box, enter the following code:
<apex:page standardController="OBJECT" recordSetVar="accs" extensions="plauti.dapActionLauncherRedirectController" action="{!redirectToActionGrid}"> </apex:page>
where you replace OBJECT by the object API name. For example, if you are creating a Visualforce page and custom button for Cases, the code would be as follows:
<apex:page standardController="Case" recordSetVar="accs" extensions="plauti.dapActionLauncherRedirectController" action="{!redirectToActionGrid}"> </apex:page>
- Click Save.
- Make sure that your non-SystemAdministator profiles also have access to this Visualforce page.
You have created a Visualforce page to use in the next step.
Create a Custom Button
Create a custom button for the Action Grid, to display in List Views:
- Still in the Salesforce Setup, open the Object Manager.
- Find the object where you want to add the Action Grid and click to open it.
- In the left-hand panel, click Buttons and Links, or Buttons, Links, and Actions.
- Click New Button or Link in the top right-hand corner.
- The New Button or Link card opens. Enter the following data:
- Label: Action Grid
- Name: dapActionGrid
- Display Type: List Button
- Tick ‘Display Checkboxes (for Multi-Record Selection)’
- Behavior: Display in existing window without sidebar or header
- Content Source: Visualforce Page
- Visualforce Page: if not automatically added, add the Visualforce page that you created in the step above
- Click Save.
- After creating the custom button for an object, follow the steps in Add the Action Grid to Leads, Accounts and Contacts to add the Action Grid to the object.
- Repeat the steps above for other objects where you want to use the Action Grid.