You may be aware that when it comes to improving user experience on a record page,  Dynamic Forms have become more and more powerful over the last few Salesforce releases. A good example is the ‘Add Fields from Related Objects to Dynamic Forms-Enabled Pages’ feature from the Spring ‘24 release, which came from a  Salesforce IdeaExchange request.

Dynamic forms are a huge win for making more customizable and engaging user experiences, at least for custom objects and most standard objects. There are still a few that don’t have this feature yet. (I’m looking at you, Campaigns) 

Here’s a handy workaround that may help where dynamic forms in Salesforce aren’t supported.

Check out the latest Spring ‘24 Release updates here, including where you can display related record fields on a record. 

The Use Case: A “Dynamic” Campaign Page

You want to collect certain information for your campaigns, but the data differs depending on the type of campaign. 

Examples may include:

Events

Location

Venue Address

Venue Contact Info

# of Days

Webinar

Webinar platform

Presenter details

Partnerships

Partner Information

Type of Partnership

Partner Contact Info

All of this different data living on the record page can be cluttered and noisy, and forcing the user to scroll through the page to get to the data they need to fill in. It’s not a great user experience and not a great recipe for capturing quality data. 

Wouldn’t it be nice if we could bump up specific fields to more prominent areas of the page based on the type?

Unfortunately, Dynamic Forms can’t help us here (at least not yet — you can upvote the idea here). Some may choose to use record types and page layouts, but that may not be ideal for all companies. 

An Alternative Solution for Salesforce Dynamic Forms

While we may not be able to use Dynamic forms, there are some other Lightning features that can give us a potential workable solution: 

First we create a Quick Action, which allows us to build a mini page layout of the fields we want to highlight.

Then we use Lightning Page builder features to display this mini-layout above the fold so it’s easy for the user to find and update:

Related Record component

Set Component Visibility 

Here’s how.

Create an Action for Partner fields

From Object Manager > Campaign > Buttons, Links, and Actions

Click New Action

For Object Name, select Campaign

For Action Type select Update a Record

For Label, enter a label that is appropriate for this purpose. It’s a good idea to make it relevant and easy to idenity what it’s for.

For example ‘Update Campaign – Event Details’

Enter a Description outlining the purpose of this action

Click Save

Edit the Action Layout

Once you have saved, you will be looking at the Action Layout page. Here is where you can choose what Campaign fields to display and the arrangement. 

Just like you would for a page layout, drag and drop the fields that you want to be visible. 

Click Save

If you see this message, go ahead and select Yes. We won’t need the Campaign Name on this layout for our use case.

You can edit this later from the Edit Layout button at the top of the page.

Now we can add our new layout to the Campaign record page

From Object Manager > Campaign > Lightning Record Pages

Select the Lighting Record Page you want to update and click Edit.

Drag the ‘Related Record‘ component where you want it on the page

In the Related Record settings panel on the right, update the following:

Header Label = the heading that should appear at the top of that layout on the page

Lookup Field = Use this Campaign

Update Action = the action that you created in Step 1

Click Save

Select ‘Set Component Visibility’ for the Related Record component. 

In the filter area, select Type = ‘Conference’

Voila! Now when working on a Campaign record, the Event Details will appear in their own “section” when the Campaign Type = Conference.  You can repeat this for other fields you want to appear on the page in specific circumstances.

To edit these fields, click the pencil icon next to the field you want to edit. All of the fields in that section will become editable, and notice that the other fields are not. These fields are edited separately because they are part of another component. When done, click the Save button to save the fields in that section. 

Build better experiences with this alternative to Dynamic Forms

While Dynamic Forms in Salesforce are fantastic for jazzing up user experiences, there are times when you need alternatives. Diving into Lightning features such as Quick Actions and Lightning Page Builder can help you to cook up custom solutions that do the job,  like the workaround we’ve explored here for displaying those crucial record fields based on different scenarios.

As you tinker around with ways to supercharge your Salesforce setup, remember, we’re in your corner. Want to chat about how to make your Salesforce dreams a reality? Reach out to the Sercante team today. Let’s brainstorm together and unlock the full potential of your Salesforce journey.

Original article: An Alternative to Salesforce Dynamic Forms When You Need It

©2024 The Spot. All Rights Reserved.

The post An Alternative to Salesforce Dynamic Forms When You Need It appeared first on The Spot.

By