Skip to main content

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

Salesforce ๋„์›€๋ง์—์„œ Trailhead ํ”ผ๋“œ๋ฐฑ์„ ๊ณต์œ ํ•˜์„ธ์š”.

Trailhead์— ๊ด€ํ•œ ์—ฌ๋Ÿฌ๋ถ„์˜ ์˜๊ฒฌ์— ๊ท€ ๊ธฐ์šธ์ด๊ฒ ์Šต๋‹ˆ๋‹ค. ์ด์ œ Salesforce ๋„์›€๋ง ์‚ฌ์ดํŠธ์—์„œ ์–ธ์ œ๋“ ์ง€ ์ƒˆ๋กœ์šด ํ”ผ๋“œ๋ฐฑ ์–‘์‹์„ ์ž‘์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ ์˜๊ฒฌ ๊ณต์œ ํ•˜๊ธฐ