function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
akshay cpakshay cp 

Role hierarchy facing issue

I have users A and B with same role, and below each of them there are 2 users. Here A is able to see all the records of the users below B and B is able to see all the records of the users below. Please help me how can I restrict both of them. They should only be able to see records of users below them. Please Help
VinayVinay (Salesforce Developers) 
Hi Akshay,

You can set Org-Wide Default access as 'Private' for the object. Also, if it is custom object and you can also restrict record visibilty by Role Hierarchy. Uncheck the 'Grant Access Using Hierarchies' option to restrict the access by Role Hierarchy.

Also review workaround mentioned below.

https://developer.salesforce.com/forums/?id=9060G000000I94QQAS

Please mark as Best Answer if above information was helpful.

Thanks,