[SalesForce] Show/hide related lists based on profile

I currently use page layouts and profiles to show a related lists to one set of users but not another. For example:

Sales users:

  • do not see related list of Price List objects
  • can read Price List objects via Apex code where sharing is used

Sales Admin users:

  • do see related list of Price List objects
  • can read Price List objects via Apex code where sharing is used

Sales users have a page layout that does not include the Price List object related list. Sales Admin users have a different page layout that does include the Price List object related list.

What I would like to know is if there is a way to hide the related list of Price List objects from the Sales users without resorting to using a page layout. Sales users still needs to be able to read Price List objects via Apex code.

Is this possible?

Best Answer

You could only arrange this if you were willing to implement your own sharing (e.g. using without sharing) and remove access to the child object entirely for the users that shouldn't see it. Keep in mind that if they can see the object, they can also report on it, so you'll probably need to do this anyways.

Related Topic