爆料tv

How to enable Salesforce dynamic forms and deploy them with 爆料tv

How to enable Salesforce dynamic forms and deploy them with 爆料tv

David Runciman on

Share with



If you have lots of fields on your page layouts, you鈥檒l have noticed that record pages can become overwhelming 鈥 or, in Salesforce鈥檚 own words, 鈥渁 monolithic block鈥. Dynamic forms are Salesforce鈥檚 solution to that problem.

In this post we鈥檒l look at what Salesforce dynamic forms are, their benefits and how to configure them. We鈥檒l also cover how to deploy dynamic forms with change sets and how 爆料tv simplifies that process for quick and reliable deployments.

TDX

Find out more

What are dynamic forms?

Dynamic forms are part of the Salesforce Lightning Experience that allows you to configure custom field placement and component visibility rules on record pages. With conditional field visibility, you can decide which fields the user sees based on variables such as user details, record values, device type, and more. This reduces clutter and gives a user-specific experience by showing only the fields relevant to that viewer.

This is a big contrast to traditional page layouts where assignments can only be based on profile and record type. This means teams often end up building multiple page layouts for different scenarios, massively increasing the work required to build and maintain layouts. For example, if you had a custom object to track projects, you鈥檇 need to create different layouts based on record type, such as 鈥淚n progress鈥 or 鈥淐ompleted鈥. If you used a dynamic form instead you鈥檇 only need one Lightning Record Page with visibility rules that covered both scenarios.

Benefits of dynamic forms

Delivering a customized experience for users is a key benefit of dynamic forms 鈥 but it鈥檚 not the only one. By upgrading to dynamic forms you can also expect:

  • Reduced loading speed. Page layouts load all the fields, even if they鈥檙e hidden. Meanwhile, a dynamic form will only load the required fields which can drastically improve page performance and loading times.
  • Streamlined maintenance. By managing all visibility rules on one Lightning Record Page dynamic forms allow for a single assignment model, helping avoid the time and cost of managing multiple page layouts.
  • Easy configuration. Dynamic forms are set up using drag-and-drop configuration. This makes it a straightforward process for all team members and speeds up delivery timelines.
  • Availability on mobile devices. Initially, dynamic forms were limited to desktops but Salesforce has since extended availability to mobile, which is currently in beta.

Limitations of dynamic forms

Dynamic forms can be a great way to support your end users by helping them access the right data quickly and easily, but they also come with a few limitations.

  • Only some standard objects are supported. When dynamic forms first became available it was only possible to use them on custom objects. Salesforce has extended support to some standard objects too but this support remains limited.
  • Can only be used in Lightning. Dynamic forms are exclusive to the Lightning Experience so can鈥檛 be used in Classic orgs.
  • Reduced loading speeds. Improved loading speeds is a huge benefit of dynamic forms, but if they become too detailed or complex, the page load times will start to increase and users will experience significant lag. It鈥檚 worth considering whether the customisation is worth the lag time for users in your scenario, and whether speed or ease is most useful.
  • Not supported in Experience Cloud. While dynamic forms aren鈥檛 currently supported by Experience Cloud, users continue requesting this update so hopefully support will be added in the future.

How to upgrade to dynamic forms

Upgrading to dynamic forms is easy. Open up one of your record pages with the Lightning app builder, where you鈥檒l see the option to Upgrade Now in the record detail pane. This button launches the migration wizard, which doesn鈥檛 take long to work through.

Upgrade to dynamic forms

How to configure a dynamic form

Once you鈥檝e upgraded to dynamic forms, you鈥檒l see a new Fields tab, with a set of new components. Drag and drop these components onto your page to start customizing your fields and sections. You鈥檒l need a field section component before you can add fields to it.

Dynamic forms open up some really useful options for configuration: you can decide how the page will work for mobile, and set conditions for when fields and components should be visible. These are improvements that will make life much easier for admins needing to create highly customized layouts.

Add new field components

How to deploy dynamic forms with change sets

Before you deploy this metadata (using any tool), you鈥檒l need to make sure you enable dynamic forms manually in both your source and target environments; the upgrade itself isn鈥檛 a metadata change that can be deployed.

  1. Start creating your change set by going to Setup > Outbound Change Sets in your source org and clicking New.

  2. Add your dynamic form to the change set by clicking New > Lightning Page and select the Lightning Record Page where you created the dynamic form.

  3. To give your deployment package the greatest chance of success, you need to add the other components connected to your dynamic layout 鈥 such as custom fields, custom objects, or profiles. You can click View/Add Dependencies and Salesforce should add these components automatically but it鈥檚 worth checking that nothing has been missed.

  4. The final step in your source org is to click Upload which uploads the change set to your target org.

  5. To deploy the changes you need to log into your target org, navigate to Inbound Change Sets to validate then deploy the package.

How to deploy your changes using 爆料tv

Let鈥檚 walk through how quick and simple it is to deploy dynamic forms with 爆料tv. If you鈥檇 like to follow along, why not start a to try out dynamic form deployments in your own orgs?

1. Configure your comparison

With dynamic forms enabled in your chosen orgs, select your source and target environments 鈥 any new or changed layouts you create with dynamic forms are saved as the so make sure to include the Lightning page in your metadata filter. Selecting the exact Lightning page you want to deploy will speed up the comparison.

Screenshot: 爆料tv's compare and deploy landing page showing a source and target org selected

2. Build your deployment package

You鈥檒l be able to see the differences between Lightning page metadata between your source and target. These changes are separated into changed, new, and deleted. Select the components you want to deploy and click Next.

Screenshot: 爆料tv's comparison page showing a new dynamic form

3. Troubleshoot your package

骋别补谤蝉别迟鈥檚 problem analyzers will check your deployment package for common issues that could cause your deployment to fail 鈥 you can accept the fixes with just a click and don鈥檛 have to rebuild your package.

Screenshot: 爆料tv's problem analysers have identified an issue with the deployment package

4. Deploy your dynamic form

On the deployment summary page, give the deployment a friendly name and add any relevant deployment notes. You can then attach user stories to the deployment and change their position on the kanban, to keep your ticketing system up-to-date without having to leave 爆料tv.

If you鈥檙e ready to go, click Deploy now or you can validate the package and schedule it for a later date.

Screenshot: 爆料tv's deployment summary page showing what items have been included in your package with options to add a deployment name, notes, and user stories

Customize user experiences easily with dynamic forms

While dynamic forms are a great addition to Lightning, deploying them can be tricky. With our metadata comparison engine, validation tools and problem analyzers, 爆料tv will help you to deploy successfully, first time. Try it for yourself today with a or speak to one of our DevOps experts to find out more.

Ready to get started with 爆料tv?