Add the Action Grid to other Objects

Last published at: 2023-11-24 14:15:45 UTC
Delete

The DAP Action Grid is available for the Premium and PDM editions.

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:

  1. Go to the Salesforce Setup.
  2. Find Visualforce Pages and open it.
  3. Click New.
  4. For Label, enter a label to identify the Action Grid Visualforce page with, for example Action Grid.
  5. 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.
  6. Select Available for Lightning Experience, Experience Builder sites, and the mobile app.
  7. Leave Require CSRF protection on GET requests unticked. 
  8. 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>
  1. Click Save.    
    A Visualforce page for adding the Action Grid to Cases
  2. 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:

  1. Still in the Salesforce Setup, open the Object Manager
  2. Find the object where you want to add the Action Grid and click to open it.
  3. In the left-hand panel, click Buttons and Links, or Buttons, Links, and Actions.
  4. Click New Button or Link in the top right-hand corner.
  5. 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

  1. Click Save.
  2. 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. 
  3. Repeat the steps above for other objects where you want to use the Action Grid.