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
Raphael BendenounRaphael Bendenoun 

Team member sharing the same role - Role hierarchy management

Hi all,

I am quite new to Salesforce, trying to understand how to customize it to my company's needs. 
My goal is to be able to define teams, 
I understood that teams are defined by roles. and if a Manager user is assigned to a specific role "Manager" he will be able to see everything shared by users assigned to roles beneath that 'Manager'

my question is the following: If two managers share the same role "Manager" will they be able to see everything that is related to the other Manager in addition to the users beneath the 'Manager' Role? 

how can I achieve it ? 
Thx you very much 

ShirishaShirisha (Salesforce Developers) 
Hi Raphael,

Greetings!

Once,you create the Role hierarchy tree then you will need to assign the users based on their role.So,if you have two managers then you can assign those two managers for Manager role and then they will be able to see the data which has access to their users beneath the manager role.

Please refer the structure mentioned in the below link for clear picture on this.

https://trailhead.salesforce.com/en/content/learn/modules/data_security/data_security_roles#:~:text=A%20role%20hierarchy%20works%20together,have%20to%20your%20Salesforce%20data.&text=Each%20role%20in%20the%20hierarchy,or%20group%20of%20users%20needs.

Kindly let me know if it helps you and close your query by marking it as best answer so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
Raphael BendenounRaphael Bendenoun
Hi Shrisha, 
That I understood ... my question is the data of the user below him. but can he see the data of user that are at the same level

User-added image

In my hierarchy Manager 1 and manager 2 work with the same team but independently as well .. so manager 1 need to see the data of Manager 2, employee 1,2,3,4. Manager 2 can see Manager 1 + employee 1,2,3,4

What do you think @Shirisha
Raphael BendenounRaphael Bendenoun
Hi Shrisha, 
That I understood ... my question is the data of the user below him. but can he see the data of user that are at the same level

This image is not available because: You don’t have the privileges to see it, or it has been removed from the system

In my hierarchy Manager 1 and manager 2 work with the same team but independently as well .. so manager 1 need to see the data of Manager 2, employee 1,2,3,4. Manager 2 can see Manager 1 + employee 1,2,3,4

What do you think @Shirisha
ShirishaShirisha (Salesforce Developers) 
Hi Raphael,

No,users under the same role can not see the data of each other.If you would like to allow them to access the data of each other users then you can try the below approach by creating the sharing rule:

A private OWD does not grant access to other users in the same role. If you want users within the same role to share data, then you will need to create a sharing rule (in Setup->Sharing settings). This will be an ownership based rule, which grants read/write access to all users in the role "Manager" if owned by role "Manager".

Thank you!
 
Vivek Pandey 42Vivek Pandey 42
I think I have a similar question. What if there are 2 Managers, with their own set of Employees. M1 -> {E1,E2,E3} and M2 -> {E4, E5}
Now M1 and M2 have role "Manager" as they are exactly the same, and E1-E5 all have role "Employee" as they are also exactly the same in function. But if the role hierarchy maps Manager directly above Employer, then M1 can see data of all employees E1-E5 whereas he should only have been able to see for E1, E2 and E3
This maybe stupid question, but an answer would help me for sure.
Don Wedd 4Don Wedd 4
Here is a situation where it does not seem possible to share a record with sharing rules or even manually. 
Two users are in the same position in the role hierarchy; they are in the same "leaf" in the same node in the hiearchy, so they are peers. In the org chart from Raphael above, they could be Employee 1 and Employee 2. They cannot see each other's Task records, if those tasks are not related to any other record (through Related To or Name fields).  In OWD, Activity visibility it Controlled by parent. These task records have no parent. The task owner cannot even manually share, because manual sharing is not available on Activity records. Any way to share with their peer?