Dynamic Forms in Salesforce [with Spring '23]

Introduction to dynamic forms in Salesforce

Dynamic forms in Salesforce allow users to customize the form fields and sections displayed to users on a page layout. This can be useful when a page layout has a large number of fields, as it can become difficult to customize the layout when all of the fields are displayed in a single, monolithic block.

By migrating the fields and sections from the page layout into the Lightning App Builder as individual components, users can configure them in the same way as other components on the page. This allows users to tailor the form fields and sections displayed to their specific needs and preferences, making it easier to create a personalized and efficient form-filling experience.

Overall, dynamic forms in Salesforce can help improve efficiency, personalization, data quality, user engagement, and streamline internal processes by allowing users to customize the form fields and sections displayed to users on a page layout.

Benefits of using Salesforce dynamic forms

Dynamic Forms in Salesforce provides several benefits to users, including the ability to place fields and sections wherever they want on a page, the ability to use visibility rules to show and hide fields and sections, and simpler layout management.

One of the main benefits of Dynamic Forms is that it provides an instant upgrade from page layouts, allowing users to place fields and sections wherever they want on a page. This flexibility can be useful for creating custom layouts that meet the specific needs and preferences of users.

Dynamic Forms also allows users to use visibility rules to show and hide fields and sections based on certain conditions. This can be useful for creating dynamic forms that adapt to the needs and preferences of individual users.

In terms of layout management, Dynamic Forms simplifies the process by allowing users to manage the fields and sections on their pages in the Lightning App Builder, without having to touch the page layout editor. This can be a more efficient and user-friendly way to manage form layouts, as it allows users to make changes more easily and quickly.

Dynamic Forms can also help reduce the number of page layouts and record types that users need, as component visibility rules allow users to control which fields and sections are displayed on a page. This can be useful for streamlining the form-filling process and reducing complexity.

Finally, Dynamic Forms provides a single assignment model for the Lightning page, rather than the dual model of assigning a Lightning page and a page layout. This can be simpler and more intuitive for users, as they only need to manage one assignment rather than two.

Dynamic forms salesforce release notes

Spring 23:

In the Spring 23 release of Dynamic Forms in Salesforce, a new feature has been added that allows users to include a save option when creating, editing, or cloning a case or lead, or when editing an account. This save option allows users to trigger territory assignment rules when saving a new lead, for example. Previously, this option was only available on page layouts.

Dynamic forms in Salesforce - Option for create, edit and clone

This change is available in Lightning Experience in Group, Professional, Enterprise, Performance, Unlimited, and Developer editions. The save option appears in the footer of the create, edit, or clone dialog box.

Winter 23:

The three core objects that now have dynamic forms available:

  • Accounts (both Business and Person)
  • Contacts
  • and Opportunities

With dynamic forms, you can migrate the fields and sections from your page layouts as individual components. This is a great way to keep your data organized and tidy.

Salesforce dynamic form updates in Oct 2022

You can see these enhancements in October 2022.

How to Create Form in Salesforce with Form Builder

How to create Dynamic forms in Salesforce?

Total Time: 10 minutes

  1. Open the Object Record page in Lightning

    open-lightning-record-page

    To access Lightning Record Pages, open an object from the Object Manager in Setup. The object must support Dynamic Forms in order to display this feature in Lightning Record Page.

  2. Create a new Lightning Page if not Exist

    Create-Lightning-Record-Page

    1. Click on New, 2. Select the Record page, 3. Set Label and Object name, 4. Select an appropriate layout, 5. Save and Activate it.

  3. Upgrade record Detail Page

    Upgrade-layout-for-dynamic-form

    In the component detail pane, click Upgrade Now to start the Dynamic Forms migration wizard.
    Choose the page layout that includes the fields you want to migrate to the page.
    The upgrade wizard uses the fields and sections from the page layout you choose and automatically adds them to your page.

  4. Add/Remove fields and Section

    drag-drop-fields-form-builder-salesforce

    Add or remove fields from the field panel as required.
    You can also make them read-only or required.

  5. Save and check the record detail page

    form builder save check record

    Click on save and check the Record Detail Page. Here You can see fields added by the dynamic form builder.

Making fields required or read-only in dynamic forms

In Salesforce Dynamic form, you can set a field as required or read-only to ensure that certain data is entered or to prevent users from modifying certain information.

There are two ways to set the required or read-only status of a field: at the field definition level in the Object Manager, and at the page layout level in the Lightning App Builder.

To set the required or read-only status of a field at the field definition level:

  1. Navigate to the Object Manager in the Setup menu.
  2. Select the object that contains the field you want to modify.
  3. Click on the Fields & Relationships tab.
  4. Find the field you want to modify and click on its name to open its field definition.
  5. Under the General Settings section, set the Required field to "Yes" to make the field required, or set the Read-Only field to "Yes" to make the field read-only.

Note that once a field is set as required at the field definition level, its Required value cannot be changed in the Lightning App Builder property panel.

Additionally, some standard fields, such as Created By, Last Modified By, Owner, and Record Type, cannot have their read-only status changed in the Lightning App Builder property panel.

To set the required or read-only status of a field at the page layout level:

  1. Navigate to the Lightning App Builder in the Setup menu.
  2. Select the page layout you want to edit.
  3. Find the field you want to modify, and click on it to open its properties in the property panel on the right side of the screen.
  4. Under the Field Settings section, set the Required field to "Yes" to make the field required, or set the Read-Only field to "Yes"

Limits of Dynamic Form in Salesforce

  • Salesforce Dynamic Forms does not work in Internet Explorer 11 or on pages based on pinned region templates or custom templates
  • Dynamic Forms does not support blank spaces
  • Users can only add up to 100 fields per column in a field section component
  • When migrating a page to Dynamic Forms in Salesforce, only fields and sections containing fields are included
  • If the page layout has too many fields and sections, some of them will be dropped
  • Users can only expand or collapse field sections in view or inline edit mode
  • Certain actions and features, such as creating, editing, or cloning opportunities or using the Clone with Related action, use record details from the page layout even if the opportunity page uses Dynamic Forms
  • If you have the Automated Account Fields setting enabled, the account create, edit, and clone windows also use record details from the page layout
  • The Evaluate this account against territory rules on save option is not supported in Dynamic Forms

Conclusion and resources for further learning

Dynamic forms in Salesforce provide a powerful tool for customizing record pages and streamlining data entry for users. By using dynamic forms, you can create intuitive and efficient layouts that help your users quickly and accurately enter data. However, there are also certain limitations and considerations to be aware of when working with dynamic forms, such as support for certain browsers and objects, and the number of fields that can be included in a field section.

If you want to learn more about dynamic forms in Salesforce, there are a number of resources available to help you get started. The Salesforce Help documentation contains detailed information on how to create and customize dynamic forms, as well as best practices and troubleshooting tips. Additionally, there are a number of online communities and forums where you can ask questions and get help from other Salesforce users and experts.

Some recommended resources for further learning include:

By exploring these resources and gaining more experience with dynamic forms in Salesforce

Frequently Asked Questions (FAQs)

What is a dynamic form in Salesforce?

Dynamic Forms in Salesforce allow users to move fields or sections from page layouts into individual components. This can be further configured into the Lightning UI Builder.

How do I use the dynamic form in Salesforce?

Dynamic Forms can be used in two ways:
1. Creating a Lightning page from scratch and dragging Field and Field Section components onto it. 2. Migrating an existing record page's details using the migration wizard.

Kritik Garg

Kritik Garg

Freelance Salesforce Developer & Consultant

Kritik Garg is a highly skilled Salesforce developer and consultant with a proven track record of successfully completing projects of various sizes and complexities, from short-term assignments to long-term partnerships. He is the founder and CEO of Arrify, and is available to work on projects in the United States, United Kingdom, and Australia.
If you are looking for Salesforce Assistant, contact Kritik now.
Kritik has extensive experience working with various industries, including banking, healthcare, education, telecommunications, and manufacturing. He is an expert in Salesforce Sales, Service, and Marketing cloud, and is skilled in programming and developing various Salesforce features, such as APEX Programming, Lightning framework, VisualForce pages, Triggers, Workflows, Page Layouts, Roles, Profiles, Reports & Dashboards.

Looking for specialized Salesforce administrators and developers?

YES
We provide Services in Columbus
Kritik, responded quickly and finished the job ahead of schedule. Look forward to working with again.
- Mike Johnson, Development Lead