Dynamic forms have been introduced to take Lightning App Builder to the next level. It makes page layout more configurable by displaying the right information at the right time. Salesforce administrators can create a dynamic experience that their users will love, as they can configure the record details and field sections in Lightning App Builder itself.
Currently, in your Salesforce organization, you have to create hundreds of page layouts for different profiles, as you may need to show different sets of fields to different users. But now, with the help of dynamic forms, you can add fields and sections to the object page layout in Lightning App Builder itself by dragging and dropping the fields to the object layout. You can also set the visibility rules to display data according to the conditions you want.
Benefits of Dynamic forms
- Dynamic forms help increase the load time as it put fields and sections in components and tabs
- Using visibility rules, you can show and hide the components according to your criteria.
- You can get rid of multiple page layouts as it uses a single assignment model for the lightning page.
- Without touching the standard page layout editor, you can manage the fields and sections in the Lightning app builder.
How do dynamic forms work?
There are two ways to make dynamic forms work
- Create a new lightning page, then click on the fields tab and start dragging the fields you want to show to the users.
- You can open the page in the Lightning app builder and click on the record detail section. on the right, you will see the upgrade to dynamic forms. Once you click on it the page layout will change to the dynamic forms layout.
Migrate a Record Page to Dynamic forms
- Launch the app launcher and click on the object whose page layout you want to change to dynamic forms
- From the setup menu, open the edit page
- When the page opens, click on the details tab, and then open the record details. In the properties section, you will see ‘ Upgrade now.’ Click on it, and you will see a change in the layout.
- The new page will look like this, and then you can set the visibility of a particular field, which will function dynamically, i.e., when the condition is satisfied, only the field will appear.
- After making the changes, click save. If there are any required fields that don’t have values, it will throw an error message, which you will have to check and have values in to save the page.
- Once they have values, click on save, and the page will get saved, and you will be able to see the changes on the record page.
- One thing to keep in mind is that dynamic forms aren’t available for mobile, so you will have to add record detail mobile to the lightning page to view it on mobile.
Limitations of Dynamic forms
- You cannot have more than 100 fields in a column
- Blank spaces are not supported yet and the related list is still handled by traditional page layouts
- The new Field section and field components aren’t compatible with mobile devices, so you will have to add a new Record-detail – Mobile Component to the Lightning page separately.