Salesforce is finally enabling the ability to customize and manage object layouts using dynamic forms with the Summer’20 release, after being one of the most requested suggestions on the Salesforce “Ideas” page.
What exactly are Salesforce Dynamic Forms?
Dynamic forms have been introduced as a means of making object layout design more configurable. Users can add fields and sections on object page layouts as individual components within the Lightning App builder using the dynamic form. Using a drag and drop interface, administrators and developers can add fields/sections to an object layout, define/control access, and add conditional logic. The following are some of the key advantages and time savings that dynamic forms provide:
The ability to finally have dynamic page layouts by setting visibility rules for fields and sections within the same page layout
The ability to transition from a rigid and monolithic page layout to a flexible structure without changing the page layout editor
Greater field reusability, with the ability to use the same field with multiple object layouts.
Any changes made to the field/section will be automatically applied to the relevant layouts.
Improved page load time due to fewer hard-coded fields/sections on the layout
How to Enable Salesforce Dynamic Forms
It is important to note that the dynamic forms feature was only available as a Non-GA feature at the time of writing this article. As a result, while you can begin testing the feature’s applicability to solving your business use case, you cannot immediately implement it in your organization. However, given the numerous benefits the feature offers, we are confident you will want to give it a try in your organization.
Enable dynamic forms in your organization by looking for record page settings in Setup and turning on the “Dynamic forms section.”
Create Dynamic Forms
The steps for configuring object layouts with Dynamic forms are as follows:
Lightning App Builder: After you’ve enabled dynamic forms in your organization, you can use Lightning App Builder to start configuring new/existing object layouts. A new section called “Field & Field section” components should be added to the Lightning App builder’s component palette.
Configure page layouts: By clicking or creating a new page, you can open an existing record page in the Lightning app builder. On the record detail pane for an existing object, select “Upgrade Now.” If you want to work on a new page, you can do so by creating a new Lightning page for any custom object and getting started.
Add fields/sections to the page: Begin by adding a field section to any tab or section of your object. The fields will then be added to the field section by following the steps below:
Include a field section component in the object page layout tab/section.
Specify the behavior of the field section component (e.g. required or readable)
Add one or more fields to the component • Define sharing settings at the component/field level (e.g. restricting the visibility of a field to certain profiles)
If your organization has mobile users, ensure that the field “Record detail” on component settings is set to “Mobile” to allow mobile users to view the details fields.
Migrate to Salesforce Dynamic Forms
If you want to use Dynamic forms to configure an existing custom object page layout, follow the steps below to enable and use dynamic forms with existing custom objects:
Open the custom object record page in Lightning experience by using one of the following methods:
Select “Edit Page” from the Setup menu. The Edit page either opens an existing copy of the object layout page in Lightning App Builder for editing or creates a new copy.
If you’re already in Lightning App Builder, you can use the Lightning App Builder list page to search for the custom object record page.
On the custom object record page of Lightning App Builder, search for the “Record detail” component and click the “Upgrade Now” button.
You will be directed to an upgrade wizard with further instructions.
Choose which page layouts should have fields added to the custom page. The system will add the fields from the selected page layouts to the custom page you are working on automatically.
Once you have completed the upgrade wizard setup, the record detail component on the custom page will be replaced by fields and sections components for further layout alignment.
Once the migration is complete, you can add/update fields and related settings on the page layout by following the steps in section 3 (Add fields/sections to the page).
Forms Limitations
We know you’re eager to see how dynamic forms can be used to finally solve your long-standing layout issues with minimal effort. We would also link to the following exceptions to keep in mind when using dynamic forms:
Dynamic forms are only available for custom objects. To update/add fields on object page layouts for standard objects, you would still need to use the page layout editor.
The component “Field section” does not support mobile devices. Any migrated page will have the setting for showing detail pages on mobile-enabled by default, but new pages will need to be enabled manually.
The design established on the page layout editor would still govern the order and visibility of any related list on the objects.
Only Lightning Experience has access to dynamic forms.
Conclusion
Now that this long-awaited feature is finally available, albeit in Beta form. We recommend investigating the benefits this functionality can bring to your daily development operations.
Leave A Comment