When it comes to customizing the Salesforce user experience, Lightning Record Pages and Dynamic Forms offer a powerful alternative to traditional page layouts. These tools allow administrators to create highly personalized, flexible, and efficient record pages by controlling the visibility of sections and fields based on user needs. In this blog, we’ll explore how Lightning Record Pages simplify layout management, how Dynamic Forms enhance field-level visibility, and how these features can streamline workflows while reducing the need for multiple page layouts.
The Power of Lightning Record Pages
Lightning Record Pages offer an upgrade from traditional page layouts, providing administrators with more flexibility and customization for the user experience. Rather than maintaining multiple page layouts for the same object, Lightning Record Pages can be set as the default for an object, customized for specific apps, record types, or profiles, and adapted for desktop or mobile use while Dynamic Forms is leveraged to handle some of the visibility fine-tuning. These pages support standard and custom components, visibility filters, Dynamic Forms, and more, enabling highly personalized user experiences.
Dynamic Forms and Visibility Filtering
Dynamic Forms allow admins to break down the record detail component into individual sections and fields, each with its own set of visibility filters. This means users only see the fields relevant to their needs. For example, an account page with a partner details section can be filtered to display based on a simple checkbox field indicating whether the account is a partner. Section filtering has been a standard feature for years with Lightning Record Pages and Dynamic Forms takes visibility filtering one step further by applying the filter logic to individual fields.
For example, if you have an account page with a section labeled strategic partner details that you only want to display when the partner type equals strategic partner, a filter could be placed on the section. If you have a field within that strategic partner details section labeled strategic partnership revenue that should only be viewed by administrator users, Dynamic Forms allows for a filter to limit visibility for users whose profile name contains "administrator".
An eye icon will display on sections and fields where a visibility filter is present:
What the admin user sees on the page:
What a non-admin user sees on the page:
Streamlining Page Layouts
The need for multiple-page layouts can also be reduced by using Dynamic Forms. By using filters, one Lightning Record Page can replace several page layouts. While too many visibility filters can impact performance, proper planning and the use of components like the accordion (which loads sections on demand) can mitigate the latency. This approach streamlines updates—editing a single Lightning Record Page is much easier than modifying several page layouts, reducing the risk of errors by creating a cleaner, more relevant user interface.
To use Dynamic Forms, first create or edit a Lightning Record Page. You can add components from the components tab or add individual fields from the fields tab. Salesforce simplifies the transition by offering a wizard to convert an existing page layout into a dynamic form. After clicking the record detail component, the "Upgrade Now" option launches a wizard that moves fields and sections into an Accordion component to improve performance.
The next step involves selecting an existing page layout—ideally, the one with the most sections and fields—and applying field and section visibility filters based on factors like field values, user permissions, or form factor.
Limitations and Considerations
Despite all the flexibility and customization that Dynamic Forms provides, there is a short list of objects that are not available for upgrade. Products and tasks as well as campaigns are not enabled for Lightning Web Components and are therefore restricted to page layouts vs. Lightning Record Pages. Additionally, the notes object uses a fixed layout that can't be modified with Dynamic Forms. Let us help you with your upgrade to a dynamic user experience!