0

Is it possible to assign different set of related lists based on a selected app in Salesforce? I am aware that one can assign based on profile and record type, but I am trying to have different set of related lists for a custom object. This custom object is shared between two apps.

Example:

Custom_Object__c in App1 when standard record detail page is viewed:

Related lists: Object1__c, Object2__c

Custom_Object__c in App2 when standard record detail page is viewed:

Related lists: Object3__c, Object4__c

I tried to tweak in the Lightning App Builder but it says that related lists are controlled in page layout. But upon checking, page layout assignments are only based on profiles and record type and there are no options for apps.

Not sure if this has already been resolved or still a Standard Salesforce limitation. Hope anyone can give me any workarounds on this.

4
  • 1
    You could use the individual related list component as many times as needed in the lightning record page, rather than using the related lists component.
    – Phil W
    Commented Jul 26, 2020 at 15:01
  • @PhilW do you control this via the Lightning app builder? I am quite confused with your suggestion.
    – Ertyq
    Commented Jul 26, 2020 at 15:17
  • 1
    Yes, defined in the lightning pages you create in the lightning app builder. You will see there are two components you can drop in the page called Related List and Related Lists. The latter shows all the (accessible by permissions) related lists from the page layout whilst the former shows a single selected related list (permissions willing) based on the details from the layout.
    – Phil W
    Commented Jul 26, 2020 at 16:18
  • @PhilW , I see it now. I used Related List - Single component instead of the other one. Thanks for the help!!!
    – Ertyq
    Commented Jul 26, 2020 at 19:14

1 Answer 1

2

The best solution here, avoiding the need for code, is to still leverage Lightning Pages, but to use multiple instances of the standard Related List component in the page, instead of the Related Lists component.

The Related List component allows you to select one of the available related lists, as defined and configured in the Page Layout, and to present just that related list.

Thus you should:

  1. Use the page layout to define all the possible related lists you wish to present
  2. Set up different lightning record pages for the two different apps for the same object
  3. Insert the individual related lists into these pages using the Related List component, in the tab and order desired

As with anything else, any given related list is only presented when the user has minimum permissions but also when included in the user's profile's page layout for the object.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .