In our previous Salesforce admin Tutorial we have learned about Creating and Managing users in Salesforce. In this Salesforce tutorial we are going to learn about Role hierarchies and Creating role hierarchies in Salesforce.
Role hierarchies in Salesforce are sharing settings at application level. Role hierarchies and sharing settings in Salesforce determines the level of visibility that users and its subordinates to access object records.
To create a role hierarchy in salesforce go to Setup | Administer | Manage Users | Roles.
- Click on Roles.
- Now a sample Role hierarchy tree list will be displayed.
- Click on Set up Roles.
In this Salesforce tutorial, we are adding a role to SVP, Sales & Marketing..
- Click on Add Role.
- Enter label name.
- Enter Role Name.
- Select the role to which this role has to report.
- Enter Role name to display on Reports.
- Click on Save button.
To add a User to Roles in Salesforce go to detail page of the Role as shown below.
- Click on Assign users to Role.
- Select all users from the picklist.
- Now all users available in Salesforce account will be displayed in available user section.
- Select the user to which this role is to be assigned.
- Click on Save button.
Before creating role hierarchies in Salesforce we have to set Organization wide default settings. To restrict users from automatic accessing to the data we have to deselect Grant Access Using Hierarchies.
- Grant Access Using Hierarchies is enabled to all object by default.
- We can deselect Grant Access Using Hierarchies for custom objects only.
Go to Security Control | Sharing Settings | Edit.
- In Managing sharing settings we have to select custom object only.
- Go to Organization wide defaults settings. Click on Edit button.
Now a list of all object in user account will be displayed. Select custom object as shown above and deselect Grant Access Using Hierarchies as shown above. Finally click on Save button.
Grant Access Using Hierarchies means the higher role get access to their lower roles. In Salesforce Role hierarchies, a manager get access to its subordinates. As shown above Grant Access Using Hierarchies are enabled for custom and standard object. We can’t disable Grant Access Using Hierarchies because by default it is the behaviour of Role Hierarchy. But we can disable for custom object as shown above.