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
phanip adminphanip admin 

Significance of Role Hierarchy

Significance of Role Hierarchy 
Scenario: In a organization Manager-A & Subordinates, Manager-B & Subordinates, Manager-C & Subordinates. When ever any subordinate will create record, no other subordinate will have access, but all the managers should have access for all the records. how to solve this? 
AshwiniAshwini (Salesforce Developers) 
Hi @phanip admin,

You can refer below steps:
1.Create a public group for each manager-subordinate pair. Add the respective manager and subordinate users to their respective groups.
Managers should be part of their own groups, and subordinates should be part of both their own and their manager's groups.

2. Set up record ownership so that when a subordinate creates a record, they become the owner of that record.

3.Create sharing rules to share records owned by subordinates with their respective managers.Sharing rules should be set up in a way that grants read/write access to records owned by subordinates to the managers of their group.Since managers are part of their own groups, they will automatically have access to records owned by subordinates in their group.

Related:
https://www.tutorialspoint.com/salesforce/salesforce_create_a_role_hierarchy.htm#:~:text=Role%20hierarchy%20is%20a%20mechanism,only%20owned%20by%20their%20manager.   
https://shreysharma.com/role-hierarchy/ 
https://help.salesforce.com/s/articleView?id=sf.security_controlling_access_using_hierarchies.htm&type=5 (https://help.salesforce.com/s/articleView?id=sf.security_controlling_access_using_hierarchies.htm&type=5
https://www.simplysfdc.com/2020/07/salesforce-sharing-rules-via-public.html 
https://resources.docs.salesforce.com/latest/latest/en-us/sfdc/pdf/sharing_architecture.pdf 

If this information helps, please mark the answer as best. Thank you