We have Dynamic Forms, Dynamic Actions, Dynamic Interactions, and now Dynamic Related Lists! Salesforce dynamic related lists add a new component to Lightning pages – ‘Dynamic Related List – Single’. This component gives you the ability to create custom related lists that can be filtered to dynamically display only when particular criteria are met.
In this guide, we’ll cover everything you need to know to make the most out of this brand new Summer ’22 feature, including tips, tricks, and top considerations.
What are Salesforce Dynamic Related Lists?
Salesforce Dynamic Related Lists are the latest feature in the ‘dynamic pages’ family – a combination of features that enable you to create intelligent, responsive pages that display the right information, at the right time, to the right users.
Related lists are great in general, right? They show you the records related to the record you are currently viewing. For example, I can see all Opportunities related to a specific Account. However, if you have a lot of records, related lists can end up becoming slightly confusing long lists… Wouldn’t it be useful if you could have a related list that only showed open Opportunities? Or one that only showed Won Opportunities? I know my users would appreciate not having to wade through records and instead be presented with the exact data they want.
Salesforce Dynamic Related Lists do exactly this and more – I can create filtered related lists, plus configure what fields are displayed, in what order, and customize what actions are available.
How Do I Set Up Salesforce Dynamic Related Lists?
First things first, you do not need to add the related list to your standard page layout in order for it to be available in the Lighting Record Page! Simply navigate to the Lightning record page you wish to update. You’ve then got two options.
You can start adding the new feature by simply dragging a Dynamic Related List – Single onto the canvas.
Or you can convert an existing “Related List – Single” by selecting it and then choosing Upgrade.
There are multiple properties to set on your “Dynamic Related List – Single” component:
- Parent Record: You can choose to show records related to this record or form a parent record.
- Related List: The Object you wish to display record from.
- Related List Label: Name your related list. This is useful when creating filtered lists e.g. “Open Opportunities”.
- Related List Type: Display as List or Tile.
- Number of Records to Display: Show a maximum of 30 records in a dynamic related list.
- Show list view action bar.
- Related List Fields: Choose and sort the fields you want to display. You can add up to ten fields, however, to display more than four fields you will need to choose the ‘List’ type and display in a main region.
- Sort Field: The field you wish to sort the list by.
- Sort Order: The order you want to sort the list by.
- Related List Filters: Add your filters to display only the related records you need. You can add multiple filters but you cannot use filter logic, therefore each filter will add another “AND” criteria.
- Actions: Add Actions
- Set Component Visibility: As usual, you can choose to add filters to set the component visibility so it only displays when criteria are met. Perhaps some of your dynamic related lists will only be relevant and visible to a particular role or profile.
Top Tip – Be sure to give your new Dynamic Related List a useful label so your users understand what filters have been applied! For example, “Closed Cases This Quarter” or “Opportunities Created Last Week”.
Want to see it in action? In the following video, I create two related lists on the Account page, one showing “Open Opportunities” and the other showing “Closed-Won Opportunities”. I can configure which fields are displayed and in what order, choose the number of records to display, and also select which actions are available.
*Note that this video was recorded prior to the Spring ’23 release. There is now a “View All” option.
- A related list does not need to be on the standard page layout to be added using Dynamic Related Lists.
- You can add the component “Dynamic Related List – Single” multiple times to the same page.
- You can use “Dynamic Related List – Single” and the other related list components at the same time, on the same page.
- Always test your page performance using the Analyze Button when editing a Lightning page.
- You can add multiple filters to a “Dynamic Related List – Single” component.
- You cannot use filter logic e.g. 1 OR 2.
- Dynamic Related Lists are supported by desktop only (not mobile).
- Dynamic Related Lists are available for custom objects, core standard objects (including Account, Contact, Case, Opportunity, Lead, etc), and standard objects that are compliant with LWC and UIAPI. Certain standard objects (such as Files) are not supported.
- Dynamic Related Lists are not available for external objects.
- If you filter on a currency field, it will use the org default currency (even if you type in a different currency).
- Date filters only support ISO format or relative dates.
- Mass Actions are not supported.
- The preview will only show six rows of data – save (and activate if needed) your page, then go back to your record to test your changes and see more than six rows of data.
- The preview data will show sample data and not your actual data e.g. you will see “Sample Text” in place of actual data. Save (and activate if needed) your page, then go back to your record to test your changes.
- Salesforce Release Notes: Customize and Filter Related Lists in the Lightning App Builder
- Learn MOAR in Summer ’22 with Dynamic Related Lists