Sub topic 7
Roles and record visibility
This chapter assumes you can open Setup, you know what objects and records are, and you have read the earlier chapters on licences, profiles and permission sets. Here you will learn what a role does, how it differs from a profile, and why you pick a role when you create a user.
Access to objects versus access to records
Profiles and permission sets decide what a user can do with an object, such as read, create, edit or delete Accounts. They do not decide which individual Account records the user can see. Record visibility comes from a separate layer: organisation-wide defaults, sharing rules, ownership and the role hierarchy.
A role is the part of that layer you set on the user record. It places the user at a position in a tree. Users higher in the tree can see the records owned by users below them.
| Concept | Question it answers | Set on the user by |
|---|---|---|
| Profile | Which objects, fields and apps can this user use? | Profile field |
| Permission set | What extra permissions does this user need? | Assignment |
| Role | Whose records can this user see through the hierarchy? | Role field |
How the role hierarchy works
Suppose the organisation-wide default for Accounts is Private. Each user then sees only the Accounts they own. Roles add upward visibility on top of that.
In this tree the Sales Manager can see records owned by both reps. Sales Rep East cannot see records owned by Sales Rep West. The CEO sees everything below.
Two details matter:
- Visibility flows up the tree, not down. A manager sees the reps' records, but the reps do not see the manager's records.
- The "Grant Access Using Hierarchies" setting for each object controls this behaviour. It is on by default for standard objects. Custom objects can switch it off.
Roles are not required, but they are common
You can create a user without a role. That user sees only the records they own, plus anything shared with them through other means. They also do not appear in the hierarchy, so no manager above them gains access to their records.
Leaving the role blank is a valid choice for some users, such as integration users or administrators who do not own business records. For most business users, assign a role so that the hierarchy matches your reporting lines.
Choosing a role when you create a user
When you create a user in Setup, the Role field is on the same form as the profile and licence. Keep these points in mind:
- A role does not grant any object permission. A user with the right role but a restrictive profile still cannot open the object.
- A role does not depend on the user licence. You can place users with different licences in the same role.
- Changing a user's role changes what they and their managers can see. Do it with the same care as changing a profile.
- Roles also feed other features, such as forecast hierarchies and reports that show "my team's" records. A wrong role can affect more than visibility.
To review your hierarchy, go to Setup, enter Roles in Quick Find, and open Roles. The page shows the tree and lets you add a role under any existing one.
Common mistakes
- Treating the role as a replacement for the profile. A role never grants create, edit or delete permission.
- Building the hierarchy from the organisation chart without checking who needs to see whose records. The hierarchy should reflect data access needs.
- Leaving the role blank for a manager, then wondering why they cannot see their team's records.
Exercise
A new user has the Standard User profile and no role. Account sharing is Private. The user's manager has a role above where this user would sit. Can the manager see the Accounts this user owns? Why?
Show answer
No. The manager gains access to a subordinate's records only through the role hierarchy, and a user with no role is not in the hierarchy. The manager would need a role assignment for the user, or a sharing rule, to see those Accounts.
Exercise
A user is placed in a high role in the hierarchy, but they get a "insufficient privileges" message when opening Opportunities. Is the role the likely cause?
Show answer
No. Roles control which records are visible, not whether the user may use the object. Check the profile and permission sets for object permissions on Opportunities.