How to hide certain items in a custom related list for certain profiles/page layouts - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Lauren RuheLauren Ruhe 

How to hide certain items in a custom related list for certain profiles/page layouts

We have a custom related list in our Opportunity page layout that shows revenue cateories.  Not everyone needs ALL of these revenue categories, so I'd like to hide them for certain page layouts.  How can I do this?  At this point, all I can see is a sorting of the list A-Z or Z-A.  Here is what the list looks like in our Org on the page:

User-added image
Steve BlackwellSteve Blackwell
Since related lists are showing records, what you see in that related list is determined by your record access to that object.

For the items you want to hide, is it always the same groups of users who don't need to see them? You could make this object private sharing and then use sharing rules to open up access to specific categories based on specific segments of users.

If that isn't the case, then there may be other ways to accomplish this. Can you tell me if the revenue category records are created automatically, or manually? If they're created automatically, you could perhaps push additional details from the opportunity into the revenue category record (these could reside on hidden fields), and then use sharing rules for the categories + the additional values to more granularly control who can see what.
Ahilesh RagavanAhilesh Ragavan
Hello Lauren,
This is not going to be possible without using a workaround (with or without custom code development).
Salesforce does not provide a straight forward declarative feature to add a related list filter on the layouts.

Code option:
You might have to build a VF page to display a filtered related list records based on logged in user.

No code option:

Idea you can upvote:
Intelligent Related Lists (Filterable by Admin)