After reading this blog you will be able to know:
- What is salesforce Dynamic form
- What are the Benefits and limitations of Dynamic form
- How to create the Dynamic form on Standard Object
What is the Salesforce Dynamic Forms:
In Salesforce, Dynamic forms are used to show some necessary fields on page layout according to the criteria given.Before dynamic forms we were struggling with having multiple pages layouts and then assigning permissions to those page layouts.The fields can be hide or show with the choice to display on page layout .Using the Dynamic forms the user can avoid showing the lots of fields on layout which makes the page look more congested. The Dynamic forms benefits to show the right information to the user at the right time.
Example:
Let's say if some fields are required but those fields should not be visible on all the page layouts and on all the user profiles so in that case Dynamic forms can come into Picture.
A form has a Gender field in the form of Checkbox. When the checkbox is checked then only Male and Female options with the radio button should be displayed. This requirement can be achieved through the Dynamic form option.
The benefits of Dynamic Forms:
1. We can use the Dynamic forms on Custom objects as well as on standard objects.
2. There is no need for Visualforce or custom coding.
3. We can upgrade Dynamic forms directly from app builder.
4. It avoids displaying Unnecessary data on Page layout.
5. If the pages are a bit different for various profiles then no need to create multiple pages.We can use Dynamic forms there.
6. The page loading will be faster.
The limitations of Dynamic Forms:
1. Blank spaces are not supported in Dynamic forms.
2. You can just add upto 100 fields per column in a Field Section component.
3. If the record page has pinned regions or custom page templates then dynamic forms will not support.
Way to enable the Dynamic form is as below:
Go to Setup-> and search for “Record” in the quick find box-> and click on the “Record Page setting” option.
From the Record setting Page->Select any Record Page View-> Click on Save option.
You will get the Success notification Message as below:
How to create Dynamic form on Standard object:
1. Open any standard object like “Accounts”
2. Open any one of the Accounts records.
3. Click on Gear icon and click on Edit Page option.
4. Search for “Dynamic” in the Search Box.
5. Click on “Dynamic related list-Single” option, drag and drop that on Layout as below:
6. From the left pane give the details as below:
1. Related list=cases
2. Related list label=Priority Cases
3. Related list type=List
7. Click on Add filter option and set the below data:
1. Field=Priority
2. Operator=Equals
3. Value=High
4. Click on Done option
5. Click on Save option
The Cases section will get displayed on the Record page with specified conditions. So basically we have created the layout as dynamic form by display only essential fields.