Sub topic 7
The role hierarchy: access flows upward
This chapter assumes you know what org-wide defaults (OWD) are, that record owners get access to their own records, and that object permissions on a profile or permission set are checked before any record-level access. It covers how the role hierarchy extends access to managers.
The working model
A role hierarchy is a tree of roles. Each user can be placed in one role. Users who sit higher in the tree get the same access as the users below them, for records those users own or can access through sharing. Access flows up the tree, never down.
Suppose the OWD for Account is Private. A sales rep owns an account. The rep's manager, the regional director above the manager and the VP above the director can all reach that account through the hierarchy. The rep cannot see the manager's accounts, and one rep cannot see a peer's accounts.
Rep B sits in the same branch as Rep A but is not above them. Rep B gets no access to Rep A's record unless the OWD, a sharing rule or another mechanism allows it.
What the hierarchy adds
The hierarchy does not lower any restriction that OWD sets. It adds access on top of the OWD baseline. It only has an effect when the OWD is more restrictive than Public Read/Write for an object. If the OWD is already Public Read/Write, everyone can read and edit every record, so there is nothing to add.
A manager receives the same level of access as the subordinate. If the rep can edit a record, the manager can edit it. If the rep only has read access through a sharing rule, the manager only has read access too.
Roles are not profiles or reporting lines
A role controls record visibility. A profile controls object and field permissions and other system settings. The two are independent, so a user's role says nothing about whether they can create, read, edit or delete an object. A manager whose profile has no Read permission on Account cannot see accounts, even when the hierarchy would otherwise give access to them.
A role hierarchy also does not have to match the org chart. Build it around who needs to see whose data. Two people with the same job title can sit in different roles, and a manager in the org chart might need no role above their team at all.
Checking the hierarchy in Setup
In Setup, search for Roles and open Set Up Roles. The tree view shows each role and lets you assign users. A role can be created under any existing role by choosing Add Role.
The user detail page shows the role assigned to a user. If a user has no role, the hierarchy cannot give them access to records owned by subordinates, and the hierarchy cannot give anyone above them access to their records.
Common errors
- Expecting access to flow downward. A director does not give a rep access to the director's own records.
- Expecting peers to share. Two reps under one manager are siblings, not parent and child.
- Leaving users without a role. These users sit outside the tree.
- Using roles to grant object permissions. Use profiles and permission sets for that.
- Building a deep hierarchy that copies the org chart, which makes sharing recalculation slower and access harder to explain.
Exercise
The OWD for Opportunity is Private. Sam and Priya both report to Dana. Sam owns an opportunity. Which of Dana, Priya and Sam's own role can see it, assuming each has Read permission on Opportunity and a role in the hierarchy? Does the answer change if the OWD is Public Read Only?
Show answer
With a Private OWD, Sam (the owner) and Dana (whose role sits above Sam's) can see it. Priya cannot, because she is a peer and not above Sam. With Public Read Only, all three can read it, since the OWD already allows everyone to read. Only the owner and Dana (through the hierarchy) can edit it.