Image
Dynamics_forms_and_actions_banner_image

Dynamic Forms and Dynamic Actions

Harika Parepally
October 26, 2020

In the Salesforce ecosystem, we all love the word 'Dynamic' as this brings in a lot of flexibility to the business to make reusable anything that is dynamic.

Dynamic Forms and Dynamic Actions is the next step in the evolution of Lightning record pages in the Salesforce Lightning Experience.

Dynamic Forms and Actions were released in Summer '20 as a beta feature, but with the Winter '21 release, both features are now generally available (GA).

Dynamic Forms

In the Summer 20 release, Salesforce brought a few fantastic ideas into reality. This idea was a 13-year-old one posted in the Salesforce Idea Exchange, and now it finally sees its roll out in all Salesforce instances across the world.

Dynamic Forms are the next level of Lightning record pages and are available only in Lightning; they offer new point-and-click functionality that was previously only available with coding. Dynamic Forms provide more efficiency, streamlining security, and layout configuration into one place.

This will be a game-changing feature that offers administrators /developers/ consultants the ability to have granular control on the lightning record pages. This low- code feature allows you to declaratively customize sections and fields of the page as per your business requirements.

Use Cases (Real Life Scenarios)

Where will you use Dynamic Forms?

  • Show a particular section on page layout when a picklist field has a specific value.
  • Display a component or section when Opportunity or Quote has reached a particular stage.
  • Display a section or certain fields depending on the value in Lead Source or Lead Rating.
  • Tick the 'Subscribe to Emails' checkbox should dynamically display the 'Email Address' field.
  • Create a different layout with selected fields for users with specific profiles or different layouts depending on the form factor. Like, HR sees what is relevant to HR, and Sales sees what is relevant to Sales.
  • A Company Employee's sensitive information like Bank Account Details Section will be visible only to the users with the "Hiring Manager" profile, that belongs to the HR department.

Step-by-Step Guide:

Here are the steps for configuring object layouts with Dynamic forms:

  • Enable Dynamic Forms
  • Add the 'Field Section' Component to Lightning Record Page
  • Create Filter to Set Component Visibility
  • Test Dynamic Forms
  1. Enable Dynamic Forms: The first step is to enable this feature in your Salesforce Org. For this, navigate to "Record Page Settings" in the Setup menu and toggle this feature 'ON.' Enable Dynamic Forms
  2. Lightning App Builder: Once dynamic forms have been enabled in your org, you can start configuring new/existing object layouts using Lightning App Builder. A new section named "Field & Field section" components will be added to the Lightning App builder's component palette. Lightning App Builder

Configure Page Layouts: Open an existing record page in the Lightning app builder. If you wish to work on a new page, you can create a new Lightning record page for any custom object and start working on the page.

For an existing object, select Upgrade Now on the record detail pane to start the Dynamic Forms migration wizard. Then walk through the wizard and select which page layout has the fields you want migrating to the lightning record page. As part of the migration process, the 'Record Detail component' is removed from the page, leaving you with fields and sections that you can configure and place anywhere as per business requirement.

Configure Page Layouts

Add Fields/Sections to the Page: Once we enable Dynamic Forms, we can add fields to the record page. Then, Select a custom object for which you want to create a new lightning record page. We can control the visibility of individual fields as well. The fields will be then added to the field section through these steps:

  • Firstly, we need to drag and drop the field section component to the object page layout tab/section.
  • Define the behavior for the field section component (e.g., required / readable)
  • Next, add one or more fields to the component.
  • Define component/field level sharing settings (e.g., Restricting the visibility of a field to certain profiles.)
  • If you have mobile users within your org, make sure you select the field "Record detail" on the component settings as "Mobile" to enable mobile users to view the detail fields.

Add Fields

[In the above image, we have added the 'The Field Section Component: Visa Details with required fields.' And Configured the component visibility rules based on two filters with Custom: USA Hiring Team profile and Country. The expected result 'Display the visa details section conditionally to specific profile'].

Dynamic Forms benefit you in these ways:

  • Provides more flexibility: An instant upgrade from page layouts: Place fields and sections wherever you want.
  • Better page performance: Placing the fields and sections into accordion components/tabs will significantly improve the page loading time.
  • Dynamic layouts: Use the visibility rules to show or hide the fields and sections in the layout.
  • Simpler layout management:
    • Manage the fields and sections on your record pages in the Lightning App Builder without touching the page layout editor.
    • Reduces the number of page layouts that you need with component visibility rules.
    • Instead of the dual model assigning a Lightning page and a page layout, Take advantage of a single assignment model for the Lightning page.
  • Dynamic Forms give us the ability to drag & drop fields on the lightning app builder itself. Also, this reduces the efforts instead of building a custom Lightning component.

Limitations:

  • Currently, Dynamic Forms is supported on record pages for custom objects only. The support for standard objects is on the roadmap for GA.
  • Dynamic Forms does not work in Internet Explorer 11.
  • Dynamic Forms does not work on pages based on pinned region templates and custom templates.
  • Blank spaces are not supported.
  • We can add up to a hundred fields per column in a Field Section component.

Limitations

Starting from the Summer '20 release, Dynamic Actions allow us to choose which actions should appear in the Highlights Panel on the object's record page. So, we can control the visibility for each action based on factors that we specify.

Use Cases (Real Life Scenarios)

Where will you use the Dynamic Actions?

  • One compelling use case is the 'Submit for Approval' button. You can hide the 'quick action' to ensure that no submissions are given for approval until all the information needed is completed. (i.e., Display the quick action only when the conditions are met)
  • Show a particular 'quick action' on a record page when a picklist field has a certain value & when the checkbox is 'True.'
  • If opportunity has reached a particular stage, then display an action only at a specific set of users, etc.
  • Hiding the 'Printable View' action on opportunity to Sales Rep due to its sensitive nature.
  • An approval process initiated by a 'quick action' in the backend system: This action is meant for sales agents and should only be visible with a specific profile 'Sales Agent Lead.'

Step-by-Step Guide:

Below are the steps to configure object layouts with Dynamic Actions:

  1. To enable dynamic actions for a custom object on desktop, in the Highlights Panel properties pane, click Upgrade Now.
    Upgrade Now
  2. Navigate to any record page and click on the Highlights Panel in the sidebar. Select the option 'Enable Dynamic Actions.' So, it allows us to control which action will appear in the highlight panel.
  3. To add an action in any of the dynamic action scenarios, click 'Add Action' in the properties pane.
  4. From the Search field, choose your action.
  5. Choose an action and click 'Add Filter' to assign the visibility rules based on record field, device type, and other filters. 'Add Filter

The Eye icon represents that we have added custom visibility rules for this action.

  • Previously to do the same, we had to create a Record Type and assign those record types to different profiles/users. But now we can control all that behavior using a single page. This will reduce the need for Record Types. dynamics actions

Dynamic Actions are also in GA (Generally Available) for custom objects. Dynamic Actions for supported standard objects (Account, Case, Contact, Lead, and Opportunity) are Beta for desktop only.

  • To assign the same/identical actions for the custom object on mobile as on desktop, in the properties pane, select "Enable dynamic actions" from the Highlights Panel for the Salesforce mobile app (Beta). Enable dynamic actions
  • Suppose you want to use a different/individual set of dynamic actions on mobile or have a mobile only Lightning page. In that case, you can 'enable dynamic actions' for your mobile via Page properties on the record page. Create/open a record page for a custom object in the Lightning App Builder. In the Page properties pane, Tick, ' Enable page-level' dynamic actions for the Salesforce mobile app (Beta). Enable page-level
  • So, to enable the dynamic actions for any supported standard object (Account, Case, Contact, Lead, or Opportunity) on desktop, add or select the Highlights Panel component on the object's record page. In the Highlights Panel properties pane, Tick the 'Enable Dynamic Actions' (Beta, desktop only). 'Enable Dynamic Actions

Conclusion:

Finally, Dynamic Forms and Dynamic Actions introduced in Summer '20 release will allow users to move away from a dependency on the page layout, enabling them to control the fields and actions using the Lightning App Builder.

Salesforce users highly appreciate these new, low-code lightning tools as they are native to the platform. Accustom yourself with Dynamic Forms & Actions because it's the future. There is an exciting roadmap ahead for these features.

About the Author

Harika Parepally Senior Technical Analyst

Harika Parepally is working with Jade Global as a Senior Technical Analyst in CRM. She has 7+ years of extensive experience rolling out multiple successful implementations and successfully delivered multiple projects. She has a strong overall understanding of end to end implementation cycles and has been successfully worked with teams of diverse skill set. Specialties: CRM system analysis, requirement gathering and system design, service and support automation, Agile methodologies, Customer/Issues Resolution, Customer Handling, Product Training.

Add New Comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.