Dynamic Forms was introduced as one of the interactive features in the roadmap for UI improvements. This new functionality lets Administrators and consultants have more precise control over record pages.
With Dynamic Forms, you can now alter sections and fields of the page according to your business’s needs. You can modify the fields and sections on the record detail page by using Lightning App Builder.
Salesforce Dynamic Forms:
Salesforce Dynamic Forms is a feature introduced in Salesforce to enhance the customization and flexibility of record detail pages within the Lightning Experience. Dynamic Forms allow administrators to create more adaptive and user-centric layouts by displaying fields and sections dynamically based on predefined criteria.
Using Dynamic Forms, you’ll be able to:
- Dynamic forms streamline data entry by displaying relevant fields based on user context, reducing clutter and enhancing productivity.
- They enable personalized user experiences by showing fields dynamically, tailored to individual preferences, roles, and permissions.
- Dynamic forms adapt to changing business needs, allowing quick adjustments to layouts and field visibility without extensive development.
- They optimize mobile usability by adjusting field layouts based on screen size, ensuring consistent and intuitive experiences across devices.
- With dynamic forms, organizations can improve data accuracy and user satisfaction by presenting only the essential information needed for each interaction.
Do Dynamic Forms exist for Standard Objects?
Dynamic Forms in Salesforce support most standard objects that are Lightning Web Components (LWC)-enabled. These objects allow for dynamic adjustments to field layouts based on predefined criteria, enhancing user experience and productivity. However, there are some objects that Dynamic Forms do not support due to various reasons, such as not being LWC-enabled or having a fixed layout
- Most standard objects that are Lightning Web Components (LWC)-enabled support Dynamic Forms. These typically include commonly used objects such as Accounts, Contacts, Leads, Cases, and Opportunities
- LWC-enabled custom objects also support Dynamic Forms, providing flexibility for organizations to customize record detail pages according to their specific needs.
- Objects that are not Lightning Web Components (LWC)-enabled do not support Dynamic Forms. Examples of such objects include Campaigns, Tasks, Events, and Products.
- Objects with fixed layouts, such as the Note object, do not support Dynamic Forms. These objects have predefined layouts that cannot be dynamically adjusted based on predefined criteria.
How Do I Set Up Salesforce Dynamic Forms?
1. Migrate or Create a New Record Page:
- Open the Lightning page you want to upgrade by clicking ‘Edit Page’ on the record page.
- Pick either the “Record Detail” or “Highlights Panel” component displayed on the page.
- Select the “Upgrade Now” option to commence the upgrade process.
- This action will enable Dynamic Forms on the page, allowing for more flexibility in the field placement and visibility.
- Click on ‘Next‘ and then select a layout in which you want to make changes.
2. Customize Sections and Fields to a Component:
Once you’ve migrated an existing Lightning page or created a new one, you’ll have the option to add components to the page. Look for the “Field Section” component and add it to the Lightning record page. This component allows you to organize and display fields directly on the record page, giving you more control over the layout and presentation of information.
In the above example, I removed the “Details” tab and replaced it with a custom tab named “Candidate Detail“. After that, I moved the “Field Section” component onto my Candidate tab.
Note: To add fields, you must first add a Fields Component!
After adding a “Field Section” component to your page, then you can start to add fields, and a “Field Section” can be added in many places on the lightning record page, not just in tabs.
To begin with, we need to include fields that must be accessible to everyone who views the record.
- It’s important to give a name to every field section
- Now you can choose whether the field is “Read Only” or “Required”.
3. Conditionally Visible:
With dynamic forms, fields and sections can be set to appear or disappear dynamically based on conditions such as field values, user permissions, record types, or device type. This allows for more personalized and contextually relevant user interfaces tailored to specific use cases or user roles.
In the below example, I have created a “Confidential Information” Section, then I have added a field called “Candidate Image” and I made the criteria visible When the Last Name field value is not equal to null.
Also, I have made the conditional appearance of the ‘Years of Experience‘ field based on the value of the ‘Current Employer‘ field.
In edit mode, our “Years of Experience” will appear once the “Current Employer” field has value, without the necessity of saving or refreshing the page.
If the ‘Current Employer‘ field contains a value, then the ‘Years of Experience‘ field is displayed.
In Salesforce Lightning, it’s important to note the distinction between Field visibility and Field Section visibility in dynamic forms. While both can be configured to appear or disappear based on defined filters, Fields are evaluated dynamically in real-time as users make changes. This means that a field may appear or disappear while a user is editing a record. On the other hand, Field Sections are evaluated only upon saving the record. This means that a new section will only show up or disappear after the user saves the record. This difference in behavior is crucial when designing dynamic forms for optimal user experience.
4. Page Performance:
Dynamic forms in Salesforce Lightning offer flexibility and customization options to tailor record pages according to specific business needs. While dynamic forms enhance user experience and streamline data entry, it’s essential to consider their impact on page performance
Here are some key considerations to optimize page performance when implementing dynamic forms:
- Place the Details component in a secondary tab to optimize layout organization. Consider using Dynamic Forms for custom objects to reduce the number of fields displayed.
- Break up the page using tabs, with only the default tab loaded initially. Additional tabs are rendered when selected, enhancing page loading speed and usability.
- Consider placing the Related List component in a secondary tab if your page has many related lists. Reducing the number of related lists to three per tab can significantly improve performance.
In the below image, I have shown the related objects in the tabs :
- If the Details and Related Lists are loading slowly, make a starting tab with just one or two important Related Lists or components. This helps prioritize critical information and improve overall page speed.
- Optimize mobile performance by reducing the number of visible components to eight or fewer. Components can be hidden from mobile view using the Lightning App Builder, ensuring a smoother user experience on mobile devices.
5. Dynamic Forms on Mobile:
In the Salesforce Mobile App Setup, turn on “Dynamic Forms on Mobile.”
- Utilize Dynamic Forms in Salesforce for Mobile to tailor record layouts specifically for mobile devices.
- Customize Dynamic Forms to display essential fields and components, optimising the user experience for mobile users.
- Leverage component visibility settings to show only relevant components on mobile devices, reducing clutter and improving usability.
- Ensure that Dynamic Forms are responsive and adapt well to different screen sizes and orientations on mobile devices.
6. Customization with Related Objects:
Dynamic Forms Customization with Related Objects has taken a significant leap forward with the introduction of the ability for users to directly add fields from related objects to dynamic forms without relying on creating formula fields. This enhancement streamlines the process of data presentation within dynamic forms, resulting in a more intuitive and user-friendly experience.
To add related record fields to a lightning Page, navigate to the Lightning Record Page Field menu, click the “arrow” next to the lookup field, and Select the fields that are available in the related record. In the above example, I have accessed the Parent Account record from Contact.
Salesforce Dynamic Forms Benefits:
- Upgrade from Page Layouts: With the upgrade from Page Layouts, you can place fields and sections wherever you want, including on separate tabs if you prefer.
- Dynamic Layouts: Implement visibility rules to dynamically show or hide fields and sections based on predefined criteria, enhancing user experience and usability.
- Layout Management: Utilize the Lightning App Builder to manage fields and sections on pages, eliminating the need to edit the page layout directly and streamlining the layout customization process.
- Reduce Page Layouts: Use component visibility rules to decrease the number of page layouts you require.
- Single Assignment Model: Instead of assigning a Lightning page and a page layout separately, use a single assignment model for the Lightning page.
Limitations of Dynamic Forms:
Dynamic forms are compatible solely with custom objects, and within a Field Section component, you can include up to 100 fields per column. Traditional page layouts will continue to control related lists, even though blank spaces are not supported.
All the features below are not supported in Dynamic forms:
- Custom & Standard Objects: At this time, dynamic forms are available for certain standard objects as well as custom items.
- Field Limit: The number of field columns that can be added to a Field section component is 100.
- Migrate a Page to Dynamic Form: Only fields and sections with fields are included in the conversion process to dynamic forms. To ensure a smooth transition and maintain crucial data integrity, other components like blank spaces and custom links are not moved.
- Templates: Dynamic forms are not compatible with pages based on pinned region templates and custom templates. It’s important to consider this limitation when designing or migrating pages, ensuring compatibility with dynamic form functionality.
- Blank spaces: Blank spaces are not supported.
Conclusion
In Conclusion, Salesforce Dynamic Forms bring a whole new level of customization to Lightning record pages, making it easier than ever for administrators and consultants to create layouts that perfectly fit their needs. With features like flexible field placement and visibility rules, users can quickly enhance productivity and improve the overall user experience.
While Dynamic Forms offers many benefits, like simplified layout management and a more responsive interface, it’s important to keep in mind certain limitations, such as support for specific object types and field column restrictions.
Overall, Dynamic Forms represent a significant advancement in Salesforce customization, giving organizations greater control over their Salesforce experience.
By partnering with Dhruvsoft, a trusted Salesforce consulting firm, businesses can unlock the full potential of Dynamic Forms. Our expert consultants can help you navigate through these features, ensuring you make the most out of this innovative tool to streamline your processes, boost user adoption, and achieve success in your organization.
Ready to revolutionise your Salesforce experience with Dynamic Forms? Contact Dhruvsoft today and let’s start on this journey together.