Skip to main content
Build the future with Agentforce at TDX in San Francisco or on Salesforce+ on March 5–6. Register now.

Get Started with Dynamic Related Lists

Learning Objectives

After completing this unit, you’ll be able to:

  • Explain the differences between dynamic related lists and related lists in the page layout.
  • List the benefits of dynamic related lists.
  • Add a dynamic related list to a record page in the Lightning App Builder.

Dynamic related lists bring a whole new level of flexibility to the Lightning App Builder. With dynamic related lists, you, the Salesforce admin, can build highly flexible related lists directly inside the Lightning App Builder. And you help your users work faster by filtering dynamic related lists to show them only the records they need.

Before dynamic related lists, you had limited options for adding related lists to record pages in the Lightning App Builder. You could choose from several Related List components and update the related list type to change how the data appeared. But to update the available lists or change a list’s columns, sort order, and actions, you needed to use the page layout editor.

Dynamic related lists add all of this functionality, and more, directly in the Lightning App Builder so you can leave the page layout editor behind.

Dynamic Related List–Single component in Lightning App Builder.

The Dynamic Related List–Single component gives you: 

  • Freedom from the page layout editor: Choose the list’s columns, sort order, actions, and more directly in the Lightning App Builder.
  • Filters on related lists: Apply filters to the list to show your users only the most important records.
  • Descriptive list titles: Give the list a creative name to let your users know exactly how you’ve filtered the lists and what records they’re seeing.
  • Flexibility to add multiple related lists to the page: Set up two or more related lists with different filters on the same object.

You can start using dynamic related lists in two ways.

  • Create a fresh Lightning record page or open an existing one. Then, in the Lightning App Builder component palette, drag the Dynamic Related List–Single component anywhere you want on the page.
  • Open a record page in the Lightning App Builder and select an existing Related List–Single component on the page. Then, in the properties pane, click Upgrade Now to upgrade it to the Dynamic Related List–Single component and migrate the list’s details.

Upgrade to Dynamic Related Lists.

In this project, we explore the first option: creating a dynamic related list from scratch.

Note: Because we’ll be using a new Trailhead org to explore this functionality, we’ll use the first option of creating a dynamic related list from scratch. However, you may find it easier in your own org to upgrade from an existing single related list to a dynamic related list.

Launch Your Trailhead Playground

You’ll be completing this hands-on project in your own personal Salesforce environment, called a Trailhead Playground. Get your Trailhead Playground now by first logging in to Trailhead, and then clicking Launch at the bottom of this page. Your playground opens in a new browser tab or window. Keep the playground window open while you do this project. After you complete the project steps in your playground, come back to this window and click Verify step at the bottom of this page.

Note

The Dynamic Related Lists–Single component is supported for custom objects and for Salesforce record home objects that are enabled for LWC. Dynamic related lists are supported on desktop only.

In this project, we add a Dynamic Related List–Single component to a record page in the Lightning App Builder. Then we configure the list just like the rest of the components on the page to give your users access to their most important related records.

Let’s get started.

  1. From the App Launcher (App Launcher), navigate to and select the Sales app.
  2. Click the Accounts tab, then select the All Accounts list view.
  3. Click United Oil & Gas Corp.
  4. From the Setup menu (Setup), select Edit Page.
    The Lightning record page opens in the Lightning App Builder.
  5. In the Related tab, hover over the components that say “Insufficient permissions,” “We found no potential duplicates of this Account,” and “Contacts,” and click Delete to delete them.
    This deletes the Data.com Insights, Potential Duplicates, and Related Lists components so that you can easily see your new Dynamic Related List-Single component on the account page later. To learn more about a component before you delete it, such as its name, click the component and review the details on the right-hand side of the page.
  6. Under the Standard list of items on the left-hand side of the page, also known as the component palette, find the Dynamic Related List–Single component and drag it to the Related tab on the page.
  7. Save the page.
  8. When the Page Saved window appears and you’re given the option to activate the page, click Not Yet.

Now that you’ve added the Dynamic Related List–Single component to your record page, let’s choose which related list to show.

  1. Click the Dynamic Related List–Single component on the canvas.
  2. In the Parent Record field in the Dynamic Related List–Single properties pane on the right-hand side of the page, leave Use This Account as the parent record.

(Note that if you choose Parent Account as the parent record, then the related list comes from the parent account instead of the United Oil & Gas Corp. account.)

3. In the Related List dropdown menu, select Opportunities.

4. Save the page.

When you selected the Opportunities related list, maybe you noticed that some of the values in the properties pane updated automatically. That’s because the Opportunities related list is already defined in the Account object’s page layout. When you selected Opportunities, Salesforce used your assigned page layout to populate the related list’s fields, but not its actions.

If you upgrade an existing Related List–Single component in the Lightning App Builder, the list’s fields and available actions populate automatically. If you choose a related list that isn’t defined on the object’s page layout, fields populate the properties pane in the default order defined by Salesforce.

In the properties pane, you can also see all of the options to customize the related list and streamline it for your users. Find out how in the next unit.

Resources

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback