What are dynamic forms and how do you deploy them with Gearset?

What are dynamic forms and how do you deploy them with Gearset?

David Runciman on

Share with

LinkedIn
Twitter

When Salesforce publishes its release notes, we’re always interested to find out more detail about the latest goodies. In the Winter ’21 Release Notes, dynamic forms are one of the things that caught our eye. This new feature offers a very welcome improvement for admins and developers looking for more granular control of Lightning record pages.

The advantage of upgrading to dynamic forms

If you have lots of fields on your page layouts, you’ll have noticed that your record detail components easily become, in Salesforce’s own words, ‘a monolithic block’. Previously, you weren’t able to customize fields, and this has led some admins to build multiple versions of the same page for different use cases.

Dynamic forms are Salesforce’s solution to that problem. Once you’ve upgraded to dynamic forms, you’ll be able to move fields around your layouts and use visibility rules to control when those fields appear.

At the moment, you can only upgrade to dynamic forms for record pages on custom objects. Hopefully we’ll see them get rolled out for standard objects in future.

Live eventConvene, Chicago

DevOps Dreamin' Chicago 2024

Find out more

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’ll see the option to Upgrade Now in the record detail pane. This button launches the migration wizard, which doesn’t take long to work through.

Upgrade to dynamic forms

Once you’ve upgraded to dynamic forms, you’ll 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’ll need a field section component before you can add fields to it.

Add new field components

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.

How to deploy your changes using Gearset

Any new or changed layouts you create with dynamic forms are described with Lightning page metadata. Before you deploy this metadata (using any tool), you’ll need to upgrade to dynamic forms manually in your source and target; the upgrade itself isn’t a metadata change that can be deployed.

Let’s walk through how quick and simple it is to deploy dynamic forms with Gearset. If you’d like to follow along for yourself, why not start a 30-day free trial to try out dynamic form deployments in your own orgs?

To begin deploying dynamic forms with Gearset, make sure that the Lightning page metadata type is selected in the metadata filter when you compare orgs. You can also filter for the exact Lightning page you’re wanting to deploy, which will speed up the comparison and simplify the deployment process.

Gearset's metadata filter

At the comparison page in Gearset, you’ll be able to see the differences between source and target in your Lightning page metadata. Unless the entire Lightning page is new, the metadata will be found under Changed items.

Add changes to your deployment package

Select the metadata to deploy and click Next. Give your deployment a friendly name, then choose whether to validate the deployment first, deploy straight away, or schedule the deployment for a release window.

A successful deployment!

Happy deploying!

While dynamic forms are a great addition to Lightning, deploying them can be tricky. With our metadata comparison enginge, validation tools and problem analyzers, Gearset will help you to deploy successfully, first time. Try it for yourself today with a 30-day free trial.

Try all of Gearset for free