Salesforce Dynamic Action Builder

Technology & Business Perspectives

Salesforce - Dynamic Action Builder

    Introduction

    If you need your users to see only actions that are relevant to them, Dynamic Action comes into play. Actions can be made available in Salesforce pages that are displayed based on certain criteria such as user’s role, profile or when a record meets certain condition. This article provides an overview of how Actions can be created in Salesforce pages.

    Lightning App Builder

    Actions can be configured in the Lightning App Builder instead of the traditional page layout editor, in terms of when they will appear thus reducing administrative time and effort.

    The Lightning App Builder is a point-and-click tool that makes it easy to create custom pages for the Salesforce mobile app and Lightning Experience. It is an UI for building pages without coding. We can build three types of lightning pages viz.,

    • App Page

    • Home Page

    • Record Page

    And you can do all of the following and much more with Dynamic Actions

    • Action Configuration Upgrade

    • Add, reorder, and remove actions directly from within the Lightning App Builder, with a modern UI and live preview.

    • Dynamic pages

    • Use visibility rules to show and hide actions to ensure users see only what is important to each of them, at a given time.

    • Simpler Layout Management

      • Manage the actions on your pages in the Lightning App Builder without touching the page layout editor.

      • Reduce the number of page layouts you need with action visibility rules.

      • Take advantage of a single assignment model for the Lightning page instead of the dual model of assigning a Lightning page and a page layout.

    Enabling Dynamic Actions

    For you to start dealing with Dynamic Actions, you need to first enable the feature. You will enable Dynamic Actions from within the Lightning App Builder and this is how you do it

    • In edit mode on a Lightning Page, select the Highlights Panel and tick 'Enable Dynamic Actions'.

    • Asset\client\casestudy\dynamic-actions-1-enable.jpg
    • This option needs to be enabled in every page where you want to have Dynamic Actions.

    • When the checkbox is ticked, a new option to Add Action will appear.

    • Asset\client\casestudy\dynamic-actions-2-add-action-button.jpg
    • Highlights Panel Component must be added on the layout first before using Dynamic Actions. This is done by checking the Highlights Panel option in the layout’s property.

    Using Dynamic Actions

    Now we are all set to start taking advantage of the enormous power that Dynamic Actions brings in. First step, however, is to ensure you do a proper planning of what actions are required, when & how, for your custom object.

    • Add Actions that are required always

      • Click 'Add Action' to get started with adding actions

      • Select the Action that you want always and to everybody such as Edit or Clone

      Asset\client\casestudy\dynamic-actions-3-add-actions.jpg

      PS:- Even if the action is added here, it is still controlled by their profile and permission sets. Like an “Edit” action will still require users to have the Edit permission for the record.

    • Reoder Actions

    • Actions can be reordered in the same way tabs are reordered by simply dragging and dropping.

      Asset\client\casestudy\dynamic-actions-4-reorder.jpg
    • Control visibility of an Action based on a field value

    • A situation where a customer needs to be Signed up for a Care Package only if the customer is not a Care Package Member already. In such a situation, the action Sign Up for Care Package needs to appear based on the value of a field and this can be done as follows

      • Click Add Action to add action to your highlights panel and select the Action that you want to add, in this case 'Sign Up for Care Package'.

      • Click Add Filter to assign visibility rules for the action.

      • Asset\client\casestudy\dynamic-actions-5-add-filter-button.jpg
      • You could add a rule that only displays the action if a user has a specific profile, or if the record data meets a specific criteria, in this case, if the value of the field 'Copy of Passport Recieved?' is false as shown below

      • Asset\client\casestudy\dynamic-actions-6-set-filter.jpg

      The action will appear only if the field condition is met.

Geval6