Add Roles To Role Hierarchy in Salesforce | Create Role Hierarchy in Salesforce

In Salesforce, role hierarchy is very important for maintaining data access. Establishing the logical hierarchical structure is used to access data from the higher position role to the lower position.

In this Salesforce tutorial, we will learn about how to create a role hierarchy in Salesforce. We will also see what is the roles and role hierarchy in Salesforce.

Additionally, we will explore step-by-step how to add roles to the role hierarchy in both Salesforce Lightning and Salesforce Classic. Moreover, we will learn to add the users to the role hierarchy in Salesforce.

Role Hierarchy in Salesforce

What is the Role in Salesforce?

In Salesforce, role can defined as record level access and used to determine visibility access, which determines what can user access in Salesforce. Roles have a sight view access than Profile.

The important thing is a role can only used when the OWD(Organization-Wide Default) of the object is Private.

What is Role Hierarchy in Salesforce, and How is it linked to Roles in Salesforce?

Roles come under the record level security, and role hierarchy determines the flow of record-level access, having a specific level of authority and responsibility from a higher position to a lower positional structure.

Example of Role Hierarchy in Salesforce

While working as a System Administrator, once I got a task where the organization wanted to create positions like HR, Manager, and Employee. With the following specifications.

  • HR can see the Manager’s and Employee’s Records.
  • Managers can see Employee’s records.
  • Employees can only see their records.
See also  How to Delete Survey in Salesforce

Here, I used role hierarchy to achieve this task, which looks like HR -> Manager -> Employee.

When do we need to use Role Hierarchy in Salesforce?

The important thing is a role can only used when the OWD(Organization-Wide Default) of the object is Private.

When the OWD(Organization-Wide Default) is not private, then there is no need to use role hierarchy because users can access each other’s records as per the name hierarchy, which means it’s like a particular structure.

Types of Roles in Role Hierarchy in Salesforce

What are the different types of Roles in Role Hierarchy in Salesforce, and how it looks?

While creating an Org account at that time, we provide a company name. That is the name of our company in the hierarchy. Under the company name, we will see roles already have been defined. We can edit that role as per our requirements.

Types of Roles in Salesforce Role Hierarchy

Here, we can edit the Role Name as per our requirements.

How to Add Roles To Role Hierarchy in Salesforce Lightning

Using the following steps, we can add roles to the role hierarchy in Salesforce Lightning.

1. On the home page, Click on the “Gear icon”, then select “Setup” from the dropdown.

2. On the setup page, “Quick Find Box” -> Search ” Roles” -> Click on “Roles”.

Role Hierarchy in Salesforce Lightning

2. Click on the Set up Role option.

Set up Roles To Role Hierarchy in Salesforce

3. Then click on the Expand All option.

Hierarchy in salesforce Lightning

4. Click on Add Role where you want to add. Here, I have selected the role below the CEO, which means he will report to the CEO.

Add Role Hierarchy Name in Salesforce

5. Enter the necessary information and click on the Save button.

  • Label – Define your role name, eg. I want to create a “Hiring Manager“.
  • Role Name – In this field, the API name will be automatically populated according to the entered label.
  • This role reports to – Here, you can specify to whom this role reports using the lookup icon. I have selected “CEO“.
  • Role Name as displayed on reports – In this field, you need to enter what label you want on reports.
Create New Role Hierarchy in Salesforce

This is how to add roles to the role hierarchy in Salesforce Lightning.

See also  How to Add a Chatter Component to Record Page in Salesforce Lightning

How to Assigned User to a Role in Salesforce Lightning

After creating roles it is very necessary to assign roles to the user.

1. After creating the role then click on the Assign Users to Role.

Add User to Role in Salesforce Lightning

OR

If you have already created a role and you just want to assign a user to a role, then you can also click on “Assign”.

Assign Roles to user in Salesforce Lightning

2. Then click on Available Users search, Select the user, click on Add Button, and Save it.

Assign User to Role Hierarchy in Salesforce

3. Now you can see that a New role has been assigned to the User.

Assign role Hierarchy to an-User in Salesforce Lightning

How to Add Roles To Role Hierarchy in Salesforce Classic

Using the following steps, we can add roles to the role hierarchy in Salesforce Classic

1. Go to Setup -> in Quick Find Box -> Search ” Roles” -> Click on “Roles”.

Roles Hierarchy in Salesforce Classic

2. Click on Add Role. here, my role reports to the Manager.

Role Hierarchy in Salesforce Classic

3. Fill the required fields and click on Save Button.

  • Label – Define your role name, eg. My role name is “Junior Manager“.
  • Role Name – In this field, the API name will be automatically populated according to the entered label.
  • This role reports to – Here, you can specify to whom this role reports using the search icon. I have selected “Manager“.
  • Role Name as displayed on reports – In this field, you need to enter what label you want on reports.
Define Roles Hierarchy in Salesforce Classic

This is how to add roles to the role hierarchy in Salesforce Classic.

How to Assigned User to a Role in Salesforce Classic

The following are the steps to assign the user to role in Salesforce Classic.

See also  How to delete an App Page in Salesforce Lightning

1. After saving the role, click on the Assign Users to Role.

Assigned Role Hierarchy to the User in Salesforce Classic

OR

If you have already created a role and you just want to assign a user to a role, then you can also click on “Assign”.

Assign Roles to user in Salesforce Classic

2. Click on Available Users Search, select the user, click on the “Add” Button, and Save it.

Assign User in Role Hierarchy in Salesforce

3. Now you can see that a New Role has been assigned to the User.

Assigned Role Hierarchy to the User in Salesforce Classic

This is how you can assign a user to the role hierarchy in Salesforce Classic.

Conclusion

In this, we got an idea about what is role and role hierarchy and when we use roles in Salesforce.

We have also discussed how to create roles to role hierarchy in Salesforce Lightning and Classic. Also, we learned how to assign users to a particular role using role hierarchy in both Lightning and Classic Interface of Salesforce.

You may like to read: