Salesforce Dynamic Forms (Non-GA-preview) are from one of the most sought-after features being released by Salesforce, this release (Summer ’20). Dynamic Forms are page layouts with an enhanced feature that will make life easier for most of the admins. We can now manage and show data to end-users in a more user-friendly way, there won’t be any bigger blocks of fields to look at. Fields and sections are now individual components that can be placed anywhere on the page. We can do away with most of the page layouts with the help of Dynamic Forms.
We can also create new tabs and add fields and field sections to those tabs to make pages more readable and load faster. One of the best parts of this release is the Visibility Rules to show/hide fields and sections based on certain criteria, which sometimes would take custom development to accomplish it. Now you can also choose to show certain fields to certain profiles by setting up the component visibility.
Here are a few exciting things we can do with dynamic page layouts:
- We can control the visibility for fields or field sections based on certain criteria.
- No need to visit page layouts to add/remove fields, it can now be done directly from within Lighting App Builder.
- We can set field visibility based on other field values, and that will update in real-time when the user selects a value.
- Enhanced page performance as now we can put fields and sections into accordion components or tabs and since these loads only when selected this will improve load time.
- We can place different page sections in different tabs, so the page looks slick and fast.
- This will also help reduce the custom development needed in some cases.
How to enable this feature?
You will need to enable this feature before using it. Go to setup and Search for ‘Record Page Settings’, enable the Dynamic Forms from here.
Once you have enabled the forms, you will see that when you open Lightning App Builder for a custom object there will be a tab that shows all the fields for this object, you can easily drag-drop these fields anywhere on the UI. But before doing that you will have to Upgrade to the new dynamic forms. You will see this option in the Record Detail properties, just click on the Upgrade Now button to launch a wizard which will add the fields and field sections to the page with only a few clicks. This won’t change the page layout but will only grab the fields and details from it.
There is an option to migrate fields and sections to the Accordion component to speed up the page load time. You can create new pages from scratch if you want.
Things to keep in mind
- Currently, only custom objects are supported.
- No support for mobiles yet. So, you will need to add new Record Detail – Mobile component (which will be available to you once you enable Dynamic Forms) to the page layouts so mobile users can see the “Detail” section. These will be automatically added to existing pages, but you would have to add these on the new page you create.
- You will still have to manage the related lists from within the existing page layouts.