# Display Dynamic Lists

{% embed url="<https://www.youtube.com/watch?index=15&list=PLS9gb0Qneac2EIlybS-X1aC418MDsAasb&pp=iAQB&v=qbUW4m9I5m4>" %}

### How to Display Different Records from Different Objects Inside Your Salesforce Page

#### Overview

This guide provides instructions on how to use the Dynamic Related List feature in Salesforce to display records from different objects on a single page. This can be useful for creating custom views of data or for providing users with easy access to related information.

#### Prerequisites

* Access to a Salesforce org with the "Customize Application" permission
* Knowledge of the Salesforce object model and field names

#### Steps

1. Navigate to the **Setup** menu and select **Object Manager**.
2. Select the object that you want to add the dynamic related list to.
3. Click on the **Fields & Relationships** tab.
4. Under the **Related Lists** section, click **New**.
5. In the **Related List Type** field, select **Dynamic Related List**.
6. In the **Related List Name** field, enter a name for the related list.
7. In the **Parent Object** field, select the object that is related to the object you are adding the related list to.
8. In the **Related Object** field, select the object that you want to display records from.
9. In the **Related List Label** field, enter a label for the related list.
10. In the **Related List Type** field, select either **List** or **Tile**.
11. In the **Number of Records to Display** field, enter the number of records that you want to display in the related list.
12. In the **Related List Fields** section, select the fields that you want to display in the related list.
13. In the **Sort By** field, select the field that you want to sort the records by.
14. In the **Sort Order** field, select either **Ascending** or **Descending**.
15. In the **Filter Criteria** section, enter any filter criteria that you want to apply to the related list.
16. In the **Component Visibility** section, select the users or groups that you want to be able to see the related list.
17. Click **Save**.

#### Example

In this example, we will add a dynamic related list to the Opportunity object that displays the most recent 10 PCs for the Opportunity's account.

1. Navigate to the **Setup** menu and select **Object Manager**.
2. Select the **Opportunity** object.
3. Click on the **Fields & Relationships** tab.
4. Under the **Related Lists** section, click **New**.
5. In the **Related List Type** field, select **Dynamic Related List**.
6. In the **Related List Name** field, enter **PCs**.
7. In the **Parent Object** field, select **Account**.
8. In the **Related Object** field, select **PC**.
9. In the **Related List Label** field, enter **PCs for Account**.
10. In the **Related List Type** field, select **List**.
11. In the **Number of Records to Display** field, enter **10**.
12. In the **Related List Fields** section, select the following fields:
    * PC Name
    * PC Stage
    * Start Date
    * End Date
13. In the **Sort By** field, select **Start Date**.
14. In the **Sort Order** field, select **Descending**.
15. Click **Save**.

After saving the dynamic related list, you will be able to see the most recent 10 PCs for the Opportunity's account on the Opportunity page.

#### Conclusion

Dynamic related lists are a powerful tool that can be used to create custom views of data and provide users with easy access to related information. By following the steps in this guide, you can add dynamic related lists to your Salesforce pages and improve the usability of your org.
