How To Create Salesforce Data View With Indirect Related Lists In XRL
Learn about configuration of indirect data views and multi-level hierarchies using XRL in Orenda Grids
In the ever-evolving world of Salesforce, the ability to visualize and access pertinent data on record pages is paramount. While the platform offers various tools to display related information, there exists a critical gap – the absence of indirect related lists. These lists allow users to seamlessly view data from unrelated objects that lack a traditional parent-child relationship. In this "How to" article, we will delve into the concept of indirect related lists, exploring why they are invaluable and how you can set them up in Salesforce Lightning Pages.
The standard Salesforce Related Lists feature has its limitations, particularly when it comes to representing complex or indirect relationships. Some of the key limitations include:
Inability to Display Indirect Relationships:
- Standard Related Lists primarily focus on direct parent-child associations.
- Indirect relationships, where a record is connected to another through intermediary objects, are not readily visible.
Limited Depth of Display:
- Salesforce's standard interface typically allows only one level of related records to be displayed directly.
- If there are multiple layers of relationships, users may find it challenging to visualize and navigate through the data effectively.
Now, we shall walk you through the process of configuring Indirect Related Lists in lightning pages- home/app/record. This follows the same procedure as Basic Configuration of Extended Related Lists. This means, you need to have admin or admin like permission to initially set up a Indirect Related Lists which can be further modified or customized by other users in the org.
We will show how we can configure Contract Related List on Test Account page where Contract and Account do not share Parent-child relationship. Follow through the give steps to do the configurations:
Step 1: On the top right-hand side menu bar of the Test_Account page, click on the gear icon, and select Edit Page to edit the page in the Lightning App Builder.
Step 2: In the App builder, you will see the Account Record page layout. On the left-hand sidebar, under the Custom Managed tab, you will find the HG- Extended Related list component. Alternatively, you can also search for the same component using the Search box.
Step 3: Drag and drop the HG-Extended Related List component to the Related tab in the Account Record page layout.
Step 4: In the property editor, enter the Indirect Related List name you want to configure. To find the indirect related lists that can be configured in Account record, you need to use greater than or ‘>’ sign. When you enter > sign in Related List search box, the drop down will show all the indirect related lists available for configuration.
Step 5: Select the >Contracts Related List in the dropdown. Note, that the input text box is case sensitive, so you need to enter the Related List name taking care of appropriate alphabet case. The Page Builder will then show Contracts Related List on Test Account Record page.
Note: Sometimes the XRL component might be empty, i.e without any records. For instance, if there are no records in the Contracts, the Related List will be empty showing “Records Not Found”.
Step 6: Click on the Save button on top right of page builder to save this configuration of Account Record page.
Step 7: Click on the back button to go back to the Test_Account page. On the Test_Account page, you would be able to see a Contracts Related List with a single column Contract Id.
Step 8: After this process, you need to add fields to the Related List view in Contracts XRL to get a default configuration available to all users in the organization. To do that, click on the settings dropdown on right and click on Configure option.
Step 9: The configuration wizard is displayed. On the left sidebar, you will see a list of all the configurable fields for the Contract Related List. Select any field you want to see in the Related List view by clicking on it and it will be visible under the Selected Fields section.
Step 10: You can select fields from the Selected Fields section which will appear in Configure tab of Field Selection. Fields with a ’>’ sign indicate a reference field. Click on the reference fields to open the objects field list. You can add up to 20 fields in a Related List view by clicking on them as needed. You can further change the order of the field in which they will appear in the Grid view. If you select a wrong field, you can click on delete icon next to field name to delete the field from configuration.
Tip: To know more about lookup fields in XRL, check out the article: " How to add and filter data through Lookup fields in XRL". |
Step 11: Click Save to save the configuration.
Step 12: Enter the label name of the view you are creating in the List View Label field as shown below. For the first configuration, it is advisable to save the view as default or admin. Click Save.
Note: This default view created by Admin will be available across the org. But only the user with XRL permission set have read/write access and can modify this configuration.
Once you're finished, you'll be able to see a Contracts Extended Related List (or Contracts XRL) on the Test_Account page with the fields you've chosen to display in the Related List view. You'll also see the Related List view name on the top of the Grid.