Salesforce Dynamic Forms – Overview & Deep Dive Tutorial

Share this article...

The #1 asked for feature is here: Dynamic Forms. It’s been 13 years in the making, 10771 votes, and 30 merged ideas; finally, the first iteration of Dynamic Forms is coming to an org near you.

In this post we’ll cover what Dynamic Forms are, how to get started, as well as what is and isn’t supported.


What are Dynamic Forms?

The premise of Dynamic Forms is to create user centric, intuitive page layouts that display the right information at the right time. Over time, the page layout, or “Details” section in Lightning pages, can become congested with fields. These fields may well be necessary but not all the time or to all users. The closest resolution we’ve had is to create multiple page layouts and different profiles, which is labour and config intensive.

Well no more. With Dynamic Forms you’ll be able to:

  • Place fields anywhere on the layout without needing to add them to the traditional page layout (“Details” tab)
  • Use visibility rules to make fields and components appear and disappear based on criteria you choose
  • Do away with multiple page layouts
  • Improve page load times

When and how can I get Dynamic Forms?

Dynamic Forms will be available in your production instance from the Summer ‘20 release and generally available from Winter ’21 release.

You’ll need to enable Dynamic Forms in your org:

  1. From Setup go to “User Interface”, then “Record Page Settings”.
  2. In the Dynamic Forms section, flip the switch to “On” (this step will no longer be required from Winter ’21 release).

What next?

Try out the new features! Once Dynamic Forms is enabled you’ll see a new tab called “Fields” when you open the Lightning App Builder for a custom object.

1. Create or migrate a page

For any custom objects you can migrate an existing Lightning page. Open the Lightning page you wish to upgrade, select the “Record Detail” component, and choose “Upgrade Now”.

Source: Salesforce Summer ’20 Release Notes

Salesforce will even prompt you with tips encouraging you to upgrade:

You can also create a brand new page by going to your custom object, selecting “Lightning Record Pages”, then choosing “New”.

Once you’ve migrated or created a new Lightning record page, you will see the option to add a “Field Section” component which will then enable you to add fields directly to the Lightning record page.

In this example, I have removed the traditional “Details” tab and created a custom tab called “Candidate Information”. I then dragged a “Field Section” component onto my tab.

Note: You need to add a Fields Component before you are able to add fields!

2. Add fields to a component

Once you’ve added a “Field Section” component to your page, you can start to add individual fields. A “Field Section” can be added in many places, not just in tabs, so go wild!

First, let’s add some fields that should always be visible to anyone who views the record:

  • Don’t forget to name each field section!
  • With a field selected, you can choose the UI behaviour such as “Read Only” or “Required”.

3. Make fields and components conditionally visible

We can make both fields and entire field components conditionally visible.

Below, I’ve added a new “Fields Section” component titled “Confidential Information”, and made it visible only to users with the Profile name “HR”:

I’ve also made the field “Distance Willing To Travel” conditionally appear only if “Willing to Travel” is true:

This is a real game changer. In edit mode, our conditional field will appear once “Willing to Travel” is checked, without the user having to save or refresh the page.

4. Plan page performance

Tabs and accordion load only when selected, so instead of adding lots and lots of “Field Section” components to the initial page (e.g. what shows when you select a record), consider utilising tabs or the accordion for improved load speed and performance.

5. Add a mobile component

You’ll need to add a “Record Detail – Mobile” component to any pages you create so your mobile users can see “Details” fields. This is because the new “Field Section” component is not available on mobile. Any migrated pages will automatically include this component.

What’s not supported?

  • Dynamic Forms is currently only available for custom objects; standard objects such as Accounts and Opportunities are not supported. Salesforce aim to make standard objects supported by Spring 2021 (safe harbour). To stay up to date on the road map for Dynamic Forms please join the Trailblazer Group here.
  • Dynamic Forms are not supported on record pages that use pinned-region or custom page templates.
  • The new Field Section component and the Field components are not supported on mobile. Any migrated pages will automatically have a new “Record Detail – Mobile” component added but you need to remember to add this if you’re building a page from scratch.
  • Traditional page layouts will still control related lists e.g. order of related lists and visible columns on related lists.

Useful resources

Summer ‘20 Sandbox Preview

Trailhead: Be An Innovator With Dynamic Pages Trailmix

Break Up Your Record Details with Dynamic Forms

Dynamic Forms & Actions Group

Release Notes

11 thoughts on “Salesforce Dynamic Forms – Overview & Deep Dive Tutorial

  1. Avatar

    again confusing terms….FORMS! A form is not what is being described it should be called DYNAMIC LAYOUTS…Salesforce has to strive for PRECISE nomenclature!!

  2. Avatar

    Noticed a different behaviour after enabling Dynamic forms. I was using “Compact” density setting before dynamic setting enabled. Once enabled and activated, Compact density setting is not working. Looks like that dynamic form is going to have only “Comfy” layout working for now…??

  3. Avatar

    Thank you so much for this article! I couldn’t figure out how to do this on my own – and turns out I am not able to do this yet on standard objects. Good to know before I wasted more time!

  4. Avatar

    So we have dynamic forms enabled, but for some objects it seems editing the fields is not available, but on others it *is* available. Not sure why or how to fix this. Any thoughts? I’m not marking any of the fields as read-only. The fields are not read-only on the default page layout either.

    The only difference I’m seeing at the moment is that I’ve overridden the edit function in classic to be a visualforce page. In lightning, I have that VF page embedded into the “Details” tab of the lightning page layout.

Leave a Reply