How does the Role Hierarchy interact with OWD settings to grant vertical record visibility?
Answer
Basics: A role describes where a user sits in the reporting structure. When OWD is Private or Public Read Only, a manager in a higher role can still see and, subject to object permissions, edit what their subordinates own. Roles are about record visibility; profiles and permission sets are about what objects and features a user can use.
How it works:
- Setup > Roles > Set Up Roles creates the tree (CEO, VP, Manager, Rep).
- Assign users to roles (a user can have one role; a role may be empty).
- For a record owned by a rep, users in roles above the rep get access through "Grant Access Using Hierarchies".
- The level of access matches the access the subordinate effectively has to that record (owners have Read/Write/Full).
- Access flows upward only, never sideways: peers do not see each other's records unless shared.
Advanced / deep dive: Hierarchy access is calculated through group membership structures rather than a share row per manager, which keeps share tables smaller, but deep or complex hierarchies increase recalculation time; avoid unnecessary levels and ownership by "integration" users at the bottom of large roles. For standard objects the hierarchy cannot be switched off; for custom objects "Grant Access Using Hierarchies" can be deselected in OWD, which is useful for sensitive objects like HR cases. Opportunities and Cases also respond to Account-based implicit sharing. Territory Management is an alternate hierarchy for accounts. Roles also affect reports ("My team's"), forecasts and dashboard views. In Apex sharing, RowCause and group IDs (Group of type RoleAndSubordinates) represent role-based access.
Code / config example:
Role tree: Sales VP
/ \
EMEA Mgr NA Mgr
/ \ \
Rep A Rep B Rep C
Rep A owns Opportunity X (OWD Private):
Visible to: Rep A, EMEA Mgr, Sales VP, admins. Not Rep B (peer), not NA Mgr.