Salesforce Dynamic Forms - Complete Guide & Tutorial 2023 | Softqube
How to Use Salesforce Dynamic Forms: A Comprehensive Guide and Tutorial
Customer Relationship Management (CRM)

How to Use Salesforce Dynamic Forms: A Comprehensive Guide and Tutorial

In 2019, during the Dreamforce event, Salesforce introduced Dynamic Forms as one of the top features in the UI enhancements roadmap in Admin & Lightning Keynotes. Since then, Dynamic Forms have come a long way and are now available as a Non-GA Preview in Salesforce’s Summer ’20 release.

Dynamic Forms are set to become a significant feature that empowers consultants and admins with granular control over their record pages. With Dynamic Forms, it is now possible to customize fields and sections on a page based on the specific needs of a business, all through a declarative setup.

Dynamic Forms are a powerful feature that can greatly improve the user experience and efficiency of any Salesforce instance. With its ease of use and flexibility, it’s no surprise that it has become one of the most talked-about features in recent years. This post will provide a comprehensive overview of Dynamic Forms, including its working, setup process, and more, to give readers a better understanding of this valuable feature.

What are Salesforce Dynamic Forms?

Salesforce Dynamic Forms are a powerful tool that allows users to create customized, user-centric page layouts that display the right details at the right time. As we all know, the “Details” section of a Lightning page can quickly become cluttered with fields that may be required, but not for all users or all the time.

Traditionally, creating separate page layouts and profiles has been a time-consuming and labor-intensive process. But with Dynamic Forms, these problems are a thing of the past. One of the key benefits of Dynamic Forms is the ability to place fields anywhere on the layout without needing to add them to the “Details” tab. This means that users can create intuitive and visually appealing layouts that are tailored to their specific needs.

In addition, Dynamic Forms allow users to use visibility rules to create fields and components that appear and disappear based on specific criteria. This can significantly enhance the user experience and streamline the workflow by eliminating unnecessary fields.

With Dynamic Forms, there is no longer a need for multiple page layouts, which can reduce the complexity of managing profiles and increase page load times.

Salesforce Dynamic Forms are a game-changer for creating customized, user-centric page layouts. They offer a wide range of benefits, including the ability to place fields anywhere on the layout, use visibility rules to create fields and components that appear and disappear as needed, and eliminate the need for multiple page layouts.

How can you obtain Salesforce Dynamic Forms?

To access Salesforce Dynamic Forms, navigate to the Lightning record page of a custom object and select either the “Record Detail” or “Highlights Panel” component. From there, you will be given the option to “Upgrade Now.” You can choose to start from scratch or migrate your current page to the new Dynamic Forms format.

How do Salesforce Dynamic Forms function?

How do Salesforce Dynamic Forms function

Salesforce Dynamic Forms are built on a new standard Lightning Component, called the “Field Section,” which simplifies the process of creating custom page layouts. To use Dynamic Forms, users can simply add the “Field Section” component to a page and select the fields they want to include in the section.

Users can also create filters to determine when the section should be displayed, on which form factor it should be displayed, and to whom it should be displayed. This makes it easy to create customized page layouts that display the right information to the right users at the right time.

Step-by-Step Guide to Setting Up Salesforce Dynamic Forms

If you’re looking to set up Salesforce Dynamic Forms, there are a few simple steps to follow. Here’s a quick guide:

Create or migrate a Lightning page

To get started, you’ll need to open the Lightning page you want to upgrade for a custom object. If you already have a page in place, select the “Highlights Panel” or “Record Detail” component, and then choose “Upgrade Now.” Alternatively, you can create a brand new page by going to your custom object, selecting “Lightning Record Pages,” and then clicking “New.”

Once you’ve created or migrated to a new Lightning record page, you’ll see an option to add a “Field Section” component. This will allow you to add fields directly to the page, so you can start customizing it with Dynamic Forms.

How to Add Fields to Salesforce Component

Once you have added a “Field Section” component to your Salesforce page, you can proceed to add individual fields to it. This can be done not only in tabs but also in various other places.
To make fields visible to everyone who views the record, it is essential to name each field section. You can then customize the behavior of each field, such as making them required or read-only.

By following these simple steps, you can easily add fields to Salesforce components, ensuring that the right information is available to the right people at the right time.

Utilizing Conditional Visibility for Customized Salesforce Page Layouts

  • Utilize conditional visibility to display fields and components selectively.
  • The behavior of Field Sections and Field visibility is different.
  • Both are dynamic, meaning that fields can appear or disappear based on user input.
  • Fields have the power to appear or disappear while a user changes a record.
  • Field Sections, on the other hand, are only edited on Save, meaning that a new section will appear or disappear after the user saves the record.

Optimizing Page Performance with Accordions and Tabs

  • Use Accordions and Tabs: Instead of adding multiple “Field Section” components to a page, you can improve performance and loading times by utilizing accordions or tabs.
  • Performance Benefits: When you select accordions or tabs, they are optimized for performance, allowing for faster loading times and a better user experience.
  • Improved Layout: Using accordions or tabs can also improve the overall layout and organization of the page, making it easier for users to navigate and find the information they need.
  • Efficient Use of Space: Accordions and tabs allow for a more efficient use of space on the page, allowing you to include more information without cluttering the layout.
  • User-Friendly: Accordions and tabs provide a user-friendly experience, allowing users to easily toggle between sections and find the information they need.

Enhancing User Experience with Salesforce Dynamic Forms

If you want to optimize the user experience for mobile users in Salesforce, adding a mobile component is essential. By including the “Record Detail – Mobile” component, users can access the “Details” fields on their mobile devices. It’s worth noting that the “Field Section” component is not available on mobile, so this step is crucial.

To get started with Dynamic Forms, there are two primary methods:

  • Building a custom object record page and adding Field and Field components as needed.
  • Migrating an existing record page to Dynamic Forms using a migration wizard. This allows for easy conversion of record details and reduces the need for multiple page layouts.

A Step-by-Step Guide to Getting Started with Salesforce Dynamic Forms

If you’re looking to start using Dynamic Forms in Salesforce, this step-by-step guide will cover everything you need to know.

The first step is to enable Dynamic Forms in your Salesforce org. This can be done by going to the Setup menu and selecting “Record Page Settings” under the “User Interface” section. From there, you can enable Dynamic Forms for your org.

Next, you’ll want to add the “Field Section” component to your Lightning Record Page. This component allows you to add and organize fields on your page layout.

To further customize your page layout, you can create filters to set component visibility. This allows you to control when certain components appear on the page based on specific criteria.

Finally, it’s important to test your Dynamic Forms to ensure that they’re working as intended. You can do this by previewing the record page or using the “Debug” mode in Salesforce.

How to Activate Dynamic Forms in Salesforce

To enable Dynamic Forms in Salesforce, begin by accessing the Setup menu and navigating to the “Record Page Setting” option in the quick find box. From there, select the desired Record Page View and click on the “Dynamic Form” section. Finally, save the changes to activate Dynamic Forms on the selected record page view.

Guide to Using Salesforce Dynamic Forms

To start using Dynamic Forms in Salesforce, follow these steps:

  • Craft a new Record Page for any customized object or migrate an existing Lightning Page using the new Dynamic Forms feature in Lightning App Builder.
  • Utilize the “Field Section” and “Field Components” in the component palette to add fields to the page. Simply drag and drop the fields and sections you want to include and choose the layout that works best for your needs.
  • Use the Dynamic Forms migration wizard to convert existing pages to Dynamic Forms. Once the wizard is activated, select the source layout and choose the page layout you want to use for Dynamic Forms. Finally, click “Finish” to complete the migration process.
  • After a successful migration, the new fields section and field components will be added to the desktop version of the page. To ensure that mobile users can view the “Details” fields, append the “Record Detail – Mobile” component to the page.
  • Finally, customize the “Field Section” label to “System Information” and select a layout style (1 or 2 columns) that fits your preferences

By following these steps, even beginners can quickly and easily start using Salesforce Dynamic Forms to create customized, user-centric page layouts.

Enhancing Lightning Record Pages with Field Section Component

One way to improve the user experience in Salesforce is to add the Field Section component to Lightning Record Pages. This component allows users to modify the behavior of fields within the Policy Object. Here are some of the ways that the Field Section component can be used to enhance Lightning Record Pages:

  • Convert fields to “required” or “read-only” based on user needs.
  • Apply filters to fields to make it easier for users to find the information they need.
  • Use advanced filters to further customize the display of fields.

By leveraging the Field Section component, users can create more intuitive and streamlined Lightning Record Pages that improve the overall productivity and efficiency of their workflow.

Improving Page Layouts in Salesforce with Filtered Component Visibility

One useful feature of Salesforce Dynamic Forms is the ability to create filters that determine when specific components are visible on the page layout. This can significantly enhance the user experience and streamline workflow.

To create a filter for component visibility, follow these simple steps:

  • Navigate to the page layout for the custom object.
  • Click on the “Set Component Visibility” button.
  • Choose the component you want to filter and click “Add Filter.”
  • Define the filter criteria and specify when the component should be visible.
  • Save and activate the page layout.

Testing Salesforce Dynamic Forms

Before fully implementing Salesforce Dynamic Forms, it’s important to test them to ensure they are functioning correctly. Here are the steps for testing Dynamic Forms:

  • Log in as a sales rep and navigate to a custom object. Tap a record to view the standard “Record Detail” component based on our settings.
  • Log in as a support rep who is working on a customer’s case related to their order shipment. Tap the record to see how Dynamic Forms can be customized based on different profiles, field values, or other custom filters.

Benefits of Salesforce Dynamic Forms:

  • Utilizes a single assignment model for Lightning pages, simplifying the allocation process.
  • Reduces the number of page layouts by using visibility rules to turn them into components.
  • Allows for easy management of sections and fields in the Lightning App Builder, without the need for the page layout editor.
  • Provides a user-friendly visual interface for selecting and organizing fields.
  • Appends sections and fields to tabs or components, improving website load times.
  • Enables rapid upgrades from page layouts by placing sections and fields anywhere on the page.
  • Reduces the need for multiple page layouts through component visibility rules.
  • Provides the benefits of a single assignment model for Lightning pages, regardless of whether a page layout or Lightning page is assigned.

Limitations of Salesforce Dynamic Forms:

  • Doesn’t support blank spaces and Traditional Page Layouts will control relevant lists.
  • Not supported on record pages with custom page templates and pinned regions.
  • New Field section and field components are not compatible with mobile devices, requiring a new Record-detail – Mobile Component.
  • Only custom objects currently support dynamic forms.
  • Dynamic Forms not supported on Internet Explorer 11.
  • Fields and sections holding fields are included when migrating a page to Dynamic Forms, but other elements like blank spaces and custom links are not.
  • When editing a section and converting two columns into one, the new column can hold up to 100 fields. Any remaining fields will be dropped.
  • Dynamic Forms is only supported for custom objects on record pages.
  • Dynamic Forms do not perform well on pages based on custom and pinned region templates.
  • Up to 100 fields/columns can be added in a Field Section component.
  • If the page layout being migrated has more sections and fields than can be handled, up to 100 sections in every region and the first 100 fields in every column will be migrated, and any remaining fields will be dropped.
  • Users can collapse or expand field sections only in inline edit or view mode, not in create, full edit, or clone windows.

How to Break Up Record Details with Dynamic Forms

Here are the steps to break up record details using Dynamic Forms:

  • As you add more fields to your record detail page, the Record Detail component becomes a monolithic block that is difficult to customize.
  • Dynamic Forms allows you to migrate individual sections and fields from your page layout into the Lightning App Builder.
  • You can then configure these sections and fields as separate components on the page and offer them to users based on their specific needs.
  • Dynamic Forms not only affects how users view fields on the record page but also what they see when creating, editing, or copying a record.
  • On pages built with Dynamic Forms, the fields users see when editing, creating, or cloning a record come directly from the fields on the page, not the page layout.

Migrating Record Pages in Salesforce Dynamic Forms

Salesforce Dynamic Forms allow users to migrate sections and fields from their existing record pages as individual components in the Lightning App Builder. This feature enables users to configure record pages to display only the necessary sections and fields, improving the user experience.

Here are the steps to migrate a record page in Dynamic Forms:

  • Open the current custom object record page in Lightning Experience. If it’s the first time, selecting “Edit Page” will create a copy of the standard page for editing. If a customized page exists, selecting “Edit Page” will open the customized page to edit.
  • In the Object Manager in Setup, open the custom object and select “Lightning Record Pages.”
  • From the Lightning App Builder list page in Setup, open the custom object record page.
  • Click on the Record Detail component.
  • Click “Upgrade Now” in the component detail pane to start the Dynamic Forms migration wizard.
  • Follow the wizard and choose the page layout that holds the fields you want to migrate to the page.

During the migration process, the Record Detail component is replaced with sections and fields that users can place and configure anywhere on the page. Additionally, if the record page supports the phone form factor, the migration adds a “Record Detail – Mobile” component to display standard record detail fields and sections on users’ mobile devices.

Tips and Considerations for Working with Salesforce Dynamic Forms

Tips and Considerations for Working with Salesforce Dynamic Forms

Here are some tips and considerations to keep in mind when working with Salesforce Dynamic Forms:

General Considerations:

  • Record Type and Owner fields are set to Read-Only and cannot be edited in the properties pane.
  • Accordion components’ programmatic versions do not offer the same functionality as their App Builder counterparts.
  • Cloning a record with Dynamic Forms-enabled visibility rules will add all fields to the cloned record, even if they are already on the page.
  • Switching page templates on a Dynamic Forms-enabled page will only display templates backed for that page.
  • Multiple instances of the same field on a Lightning page will display the same data.
  • Collapsing or expanding a field section during page design does not affect user view during runtime.
  • Ensure the Name field is marked as required and on the page to prevent blank custom object names

Tips:

  • Field Section components are desktop-only and should not be placed on mobile-only Lightning pages.
  • Avoid having both field sections and a Record Detail component on the same page to prevent user confusion.
  • Visibility rules do not work correctly on Field and Field Section components.
  • Fields that appear when editing, creating, or cloning a record are from Field Sections, not Record Detail.
  • Record Detail fields have a different tab order than Field Sections, which can create confusion.
  • Utilize one Lightning page for both desktop and mobile by adding the Record Detail – Mobile component to the same page as Field Section components.

Conclusion

In conclusion, Salesforce Dynamic Forms can offer a streamlined and customized experience for end-users while enhancing organizational productivity. While currently only available for custom objects, Salesforce is expected to extend this feature to regular objects in the near future. Our comprehensive guide has provided valuable insights into the benefits, limitations, and setup details of this feature. Keep exploring our website softqubefor more informative content on Salesforce and other related topics.

Nitin Suvagiya

Nitin Suvagiya

He is working with Softqube Technologies as Director, since 2009. He has over 15+ years of experience in Microsoft Technologies, working as a CEO and also providing consultation in DevOps as he is DevOps certified. He has good expertise in UX/UI designing in any application.