Salesforce Dynamic Forms has been in general release for a year and it’s still a hot topic. While Salesforce is continually working on enhancing this feature, Admins everywhere are learning how best to use it, which has led to a lot of questions. In this article we’ll dive into our top questions about Dynamic Forms to help you make the most out of this amazing tool.
For a full guide, check out our “Salesforce Dynamic Forms – Overview & Deep Dive Tutorial”.
1. Is Dynamic Forms available in Classic?
No! Dynamic Forms is only available in Lightning Experience. If you’ve been looking for an excuse to migrate, this might just be it.
Read More: Salesforce Classic vs. Lightning – Is Anything Still Missing?
2. Is Dynamic Forms available for standard objects?
Yes! As promised at Dreamforce ‘22, Salesforce has extended Dynamic Forms to support hundreds of standard objects! Specifically, support has been extended to the majority of LWC-enabled standard objects (Lighting Web Component enabled).
Dynamic Forms are not available on objects that do not support Lighting Web Components, including Campaigns, Tasks, and Products. To ascertain if an object supports Dynamic Forms, edit the record page on the Lightning App Builder – if you see the “Fields” tab in the component panel, Dynamic Forms are available.
Check out the latest roadmap.
3. Do I Still Need The Standard Page Layout?
Yes, not only can you update the standard page layout, you need to. The standard page layout still controls things such as which Related Lists are visible on your Lightning page layout.
UPDATE: From the Summer ’23 release, the related lists available will not be controlled by the standard page layout.
On the Candidate object, I have not added the ‘Files’ related list to my page layout:
When I try to edit my Lightning page layout, although I can see the ‘Files’ related list, when I drag it onto the page it displays an error to explain it cannot be displayed because it is not included in the page layout:
It’s also worth noting that a record’s printable view is based on the fields from the default page layout, not the fields on the Dynamic Forms page. In addition, the mobile layout is also driven by the standard page layout.
4. What If I Have The Standard Detail Page Component Plus Dynamic Form Elements Such As Sections and Fields?
There’s nothing stopping you from having both the standard detail component, as well as Dynamic Form sections and fields. However, more components will impact the page load time, plus you’ll have duplicate fields. You also need to consider what will display when a user creates a new record…see the next question for more information.
Read More: The Analyze Button: Improve Your Salesforce Lightning Page Load Speed
5. Which Is Used When Creating a Record: The Details Page or Dynamic Forms Elements?
This is a slightly complicated question and it varies depending on where/how you create a record.
Typically, once Field Section components are included in the Lightning page layout, then they are used to create a new record, not the details component. If you select the ‘New’ option from the object tab, it will use the Dynamic Forms elements, not the details page.
My Candidate Lightning page contains both the details component, as well as dynamic Field Sections and Fields:
When I try to create a new Candidate record from the relevant tab, I am presented with the Dynamic Field Sections and Fields only:
That said, if you create a record from a lookup, the fields come from the record detail component, not from the Dynamic Forms fields on the page. Check out the third bullet point on Dynamic Forms Known Issues.
6. What Happens If You Hide a Mandatory Field?
Chaos. Well, that’s not entirely true, but it does make for a very unpleasant user experience. In short, the user will not be able to save in order to create or edit, and will receive an error.
Salesforce will warn you not to do this…
And if you persist, your users will see this…
Don’t say you haven’t been warned!
7. Do Section Headings Remain, Even If All Fields Are Hidden?
Yes. Even if all the fields in a section are hidden, the section header will still be visible. Consider adding your filter to the component instead of individual fields if you want the entire section, including header, to be hidden.
8. Can You Filter By Record Type?
Yes, you can. For this, you’ll need to select ‘Advanced’ when adding your filter.
9. Can You Filter By Multiple Picklist Values?
Yes, you can. This is not to be confused with filtering by multi-select picklists (see question below).
What we mean here is can you filter on multiple picklist values e.g. if you have a picklist field ‘Rating’ with the values ‘Hot’, ‘Warm’ and ‘Cold’, can you create a filter to display only if the field value is ‘Hot’ or ‘Warm’?
Simply add two filters and set the filter logic as 1 OR 2.
10. Can I Use Multi-Select Picklists For Filters?
No. You cannot filter on multi-picklist fields.
11. Can I Use Fields From The Parent Record As Filters on Dynamic Forms?
Yes you can. When you set component visibility, click ‘Add Filter’, then select ‘Advanced’. In my developer org I have two custom objects: Role and Candidate. Role is the parent object and Candidate the child object.
By navigating to ‘Advanced’, I am able to select ‘Record’ which then displays all fields available on Candidate including the lookup to Role. I select ‘Role’ and am then able to choose a field on the Role object called ‘Level’ to use as a filter on my Candidate page layout.
A word of caution when using this functionality; when creating a new record, even with the parent record selected (e.g. referenced in a lookup), values aren’t calculated until you save.
What does this mean in terms of the functionality you can expect? It means that if you have Field Sections or Fields that are filtered based on values in a parent record, they will not be visible until after the new record is saved.
12. What About Field Visibility vs. Field Section Visibility?
Something worth noting is that Field visibility and Field Section visibility behave differently.
Although both are dynamic e.g. can be set to appear or disappear based on filters you define, Fields are super dynamic as they are evaluated live (as a user makes changes). This means that a field may appear/disappear while a user is editing a record.
In contrast, Field Sections are only evaluated on Save, so a new section won’t appear/disappear until the user saves the record.
13. Can I Add a Field More Than Once?
Yes! Unlike the traditional page layout where you can only add a field once, you can add a field multiple times using Dynamic Forms.
The reason for this is because you may create multiple Field Sections that display fields based on different criteria or for different record types or users. Although there is a clear need for this functionality, be careful you don’t accidentally add a field several times for no reason!
14. Are New Fields Auto-Added to Dynamic Forms?
No! Traditionally, when you create a new field, you have the option to auto add the field to your page layouts. It’s important to note that this only applies to the standard page layout or details section. If you are using Dynamic Forms, you need to remember to go and add your new field to your Dynamic Forms field section!
Summary
We love Dynamic Forms and hope that you do too! There are many exciting enhancements to expect from Dynamic Forms over the next few releases. Do you have any other pressing questions about Dynamic Forms? Pop them in the comments below!
Resources
- Dynamic Forms, Actions and Interactions Group
- Dynamic Forms Tips and Considerations
- Dynamic Forms Limitations
- Dynamic Forms Known Issues
Comments: