Search
Close this search box.
Salesforce Dynamic Forms Beyond Drag-and-Drop Design

Salesforce Dynamic Forms: Beyond Drag-and-Drop Design

Designers, consultants, and developers are constantly faced with challenges of user adoption and change enablement. In order to ease and possibly eliminate these challenges, it is essential to practice user-centered design throughout the entire solutioning process. When a user views a website or opens an app in order to complete a task, they’re more than likely to choose the first solution they’re presented with on the screen. Any extra digging or searching required often results in lower satisfaction and a decreased likelihood to return. Practicing a user-centered approach to execute simple and efficient design is the key to making your clients happy.

The scenario: Imagine you’re a Salesforce consultant that has been given the task of revamping a few of your client’s Lightning Record Pages

The sales and marketing teams both currently share singular layouts for the account, opportunity, and contact pages. The biggest complaint coming from users involves the Record Detail component. For example, sales users require several fields visible that marketing users do not, marketing requires specific fields on their pages that sales deems unnecessary, there are dozens of fields that neither of the groups need visible, and the overall organization of fields on the pages aren’t meeting expectations anymore and are negatively affecting efficiency and page load times.

Since sales and marketing both have different needs and workflows on each page, they’ve shared that ideally the solution would include unique and personalized page layouts assigned to the teams individually. You’ve been given a tight timeline for this project and know that creating six separate pages won’t be feasible, especially considering the amount of upkeep this would require in the future.

Luckily, Salesforce has introduced Dynamic Forms, which allows admins to configure fields and field sections on Lightning Record Pages in the same way that they’re able to customize other components on the page. As of the Spring ‘23 release, Dynamic Forms are supported on all custom objects, accounts, person accounts, cases, contacts, leads, and opportunities. You decide to part ways with the page layout editor and Record Detail component to solely utilize Dynamic Forms in the Lightning App Builder in order to improve the UI and UX for your client’s organization.

Getting started with Salesforce Dynamic Forms

Since you’re not creating any record pages from scratch, you can easily migrate your existing Record Detail component to Dynamic Forms using the upgrade wizard. To do this, you’ll click Edit on your desired Lightning Record Page. Select the Record Detail Component and view the component details. Here is where you’ll be offered to upgrade to Dynamic Forms using the wizard by clicking Upgrade Now.

Dynamic Forms Upgrade Wizard in Lightning App Builder Properties Panel
Dynamic Forms Upgrade Wizard in Lightning App Builder Properties Panel

The Dynamic Forms upgrade wizard will then guide you through the prompts required to complete the simple steps to transform your page usability. Start by selecting the page layout that contains all of the fields you’d like to migrate. The wizard automatically removes the previous Record Detail component, and replaces it with the fields and field sections inside of the new Field Sections components on your page. You then have the freedom to add, remove, and rearrange the fields as needed. Place them anywhere on the page, or even within a tab, as long as they’re inside of a Field Section component. 

Through your discovery sessions with the SMEs, you’ve noticed that the order of fields on the pages is causing some friction in their workflow. Even though users are voicing their frustrations with the current layout, it can be difficult to conceptualize what a cleaner and more intuitive future state would look like, especially if they’ve only known these layouts up until this point. Use the flexibility of the new components to easily make changes based on the challenges you’ve heard and present them to the stakeholders in an interactive working session. It’s important to sell this as a starting point and encourage everyone to imagine how the new layout could affect their day-to-day workflows.

Once everyone is comfortable with the structural changes, go through each individual field on the page to determine where it should be and why. It may seem tedious to some, but no idea or suggestion is too small — especially when designing such an essential part of the business. 

Visibility rules for Dynamic Pages

You’ve spoken with your stakeholders to determine which fields are unnecessary on the page layouts for both the sales and marketing teams and successfully removed them from the new Field Section components. Additionally, you’ve been able to reorganize fields and field sections from a user-centered approach by incorporating stakeholder input and your design expertise. So far so good, but you still need a way to hide unnecessary fields for sales and marketing while keeping their users assigned to the same layout. Enter, visibility rules for Dynamic Pages.

Dynamic Pages allow for control over when a component is visible on a Lightning Record Page by using filter conditions and logic. You are able to create visibility rules on individual fields or entire field sections which are determined by another Record Field or by advanced settings which include filtering by profile, permission, a specific device, or by certain record criteria.

Advanced Visibility Filter for Field Section Component: Visible for Users with “Custom: Sales Profile” Profile
Advanced Visibility Filter for Field Section Component: Visible for Users with “Custom: Sales Profile” Profile

You meet with the Sales and Marketing teams to determine the fields and field sections that require custom visibility rules on each page. For example, the account page has a set of fields that can be very helpful to the sales team but are irrelevant for anyone on the marketing team. You decided to create a new field section titled “Additional Information” and created a visibility rule that displays it only for users with your sales profile. Additionally, the opportunity page has a Closed Lost Reason field that users only want to appear if the deal is closed lost. You address this by adding a simple filter on Closed Lost Reason where the field is only visible if the Opportunity Stage field equals Closed Lost. Your stakeholders are very impressed with how easy it is to meet their needs on each individual page so you keep the momentum going by adding additional rules. 

Required and Read-Only field behavior

With the migration to Dynamic Forms, some stakeholders are worried about the feasibility of customizations they had previously used on their upgraded record pages. For example, their universally required fields are essential to the business and they can’t risk missing these on a record page. They also rely on several Read-Only fields to make sure users have visibility to key contact, account, and opportunity information. Luckily, both Required and Read-Only fields retain that state when migrated into a Dynamic Forms-based record page.

All of the universally required fields for your record page will appear under the Universally Required Fields section of the Fields pallet in the Lightning App Builder. However, fields made universally required at the page layout level or in the Lightning App Builder property panel won’t appear in the Universally Required Fields section.

Universally Required Fields Section in Fields Palette
Universally Required Fields Section in Fields Palette

Always remember to include universally required fields on Lightning pages that are used for creating or editing records. They will not be added to the page automatically, and if missing from the page, users will be unable to save a record after creating or editing it. Also refrain from hiding required fields with visibility filters. Users cannot save a record if values are missing from a universally required field, even if hidden by a visibility rule. 

In the Lightning App Builder property panel, in addition to adding visibility filters, you can also set a fields UI behavior from None to Read-Only or Required. It’s important to note that any changes made here will only apply to the field’s behavior on that specific record page and not to all instances of the field elsewhere in your org. 

UI Behavior Options in Lightning App Builder Properties Panel
UI Behavior Options in Lightning App Builder Properties Panel

Solving users’ needs with speed and efficiency

Dynamic Forms has been a massive innovation for Salesforce’s user and designer experience. Not only does it further build upon the convenient Lightning App Builder drag-and-drop interface, but it also makes it even easier to incorporate user-centered design into your record pages. User-centered design is an iterative process, making participation from your stakeholders essential. The sales and marketing SMEs have been instrumental in your design process by constantly providing useful feedback and suggestions. Together you’ve refactored three of the most important record pages that users rely on almost every day. The new and improved account, opportunity, and contact pages mirror the natural workflow and thought processes of the users, making it easier to do their jobs. Not to mention, the page load times have significantly decreased!

Dynamic Forms has not only eliminated the need for multiple page layouts and complicated assignments, but also saves your admins valuable time otherwise spent constantly switching between the Lightning App Builder and the page layout editor to make simple updates. Users across multiple teams can now share a single record page with different visibility rules applied to ensure they are only seeing the information they need, exactly where they need it. No extra searching or head-scratching required. Never before has it been easier to solve for the needs of your users so quickly and efficiently with the help of a few simple tools.

Need an expert’s help? Learn more about our Salesforce consulting services.