Skip to main content

Upgrade to Dynamic Forms

Learning Objectives 

In this project, you’ll:

  • Migrate a record page to Dynamic Forms.
  • Format record fields to only appear under specific conditions.

Introduction to Dynamic Forms

Record pages can get quite congested with fields, on fields, on fields. All fields are important, but do they all need to be seen by Salesforce users 100% of the time? The answer is no. 

Sometimes it depends on the data. For example, a car dealership enters leads into its Salesforce org. Does the 4-wheel drive field need to be visible all the time? No, it only needs to be seen when an applicable vehicle type is selected, such as SUV or truck. Previously, the best option to achieve such functionality was to create multiple page layouts, which is labor-intensive. 

Dynamic forms to the rescue!

Ready to Get Hands-on with Dynamic Forms?

Create a new Trailhead Playground now to follow along and try out the steps in this module. Scroll to the bottom of this page, click the playground name, and then select Create Playground. It typically takes 3–4 minutes for Salesforce to create your Trailhead Playground.

Note: Yes, we really mean a brand-new Trailhead playground! If you use an existing org or playground, you can run into problems completing the steps in this project.

Get Dynamic

It’s time to step into the wonderful world of Dynamic Forms! Use the Lightning App Builder to upgrade the records of the Account object to use Dynamic Forms.

  1. Click the App Launcher (App Launcher).
  2. Select the Sales app.
  3. Click the Accounts tab.
  4. Click the down arrow next to Recently Viewed, and select All Accounts.
  5. Open the Grand Hotels & Resorts Ltd record.
  6. From the Grand Hotels & Resorts Ltd record, click the setup icon and select Edit Page.Edit Page highlighted in the Setup menu.
  7. Click the Details tab in the page editor then select the contents of the Details section.Details section selected with Record Detail opened.
  8. With the Details section selected, click Upgrade Now in the Record Detail to upgrade to Dynamic Forms.
  9. Click Next.
  10. Select the radio button next to Account Layout.
  11. Click Finish.

Customize the Record with Dynamic Forms

  1. Select the Additional Information section and select 1 Column in the details panel on the right.Additional Information section highlighted, Field section menu opened.
  2. Drag and drop the SLA Expiration Date field to immediately above the SLA Serial Number field.
  3. With the SLA Expiration Date field still selected, click Add Filter in the details panel on the right.
  4. Enter and select Active in the Field input.
  5. Ensure operator is set to Equal.
  6. Adjust the Value to Yes.Filter applied to the SLA Expiration Date field.
  7. Click Done.
  8. Repeat steps 4 through 7 to adjust the visibility of two other fields, SLA and SLA Serial Number, to only show when the Active field equals Yes.SLA, SLA Serial Number, and SLA Expiration Date fields denoted with orange eye icons to indicate a visual filter has been applied.Note: SLA, SLA Serial Number, and SLA Expiration Date fields have orange icons to denote that a visual filter has been applied to these fields.
  9. Click Save and then Activate.
  10. Click Assign as Org Default.
  11. Select Desktop and phone.
  12. Click Next and then Save.
  13. Click the back arrow in the upper left to leave the Lightning App Builder.

Test the Dynamic Forms

  1. If necessary, navigate back to the Grand Hotels & Resorts Ltd record.
  2. Click the Details tab.
  3. In the Additional Information section, click the pencil to the right of the Active field to edit.
  4. Toggle between Yes and No to see the three SLA fields visually appear and disappear. Note: These fields are just visually hidden, not deleted. These fields are still available in reports and dashboards.
  5. Set the Active field as No.
  6. Click Save.

And just like that, you’ve converted a standard object’s record pages to use Dynamic Forms and adjusted certain fields in a record to only appear when needed. If this were a Dynamic Form, you’d be seeing a congratulations message because the success checkbox equals true!

Resources 

Keep learning for
free!
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities