Sub topic 4
Org-wide defaults: the baseline for record access
This chapter assumes you can open Setup, know what profiles and permission sets do, and understand that every record has an owner. Here you learn what org-wide defaults (OWD) are, where to set them, and how they limit every other sharing feature.
What org-wide defaults do
An org-wide default is a setting, made per object, that defines the most restrictive level of record access any user can have to records they do not own. Every other sharing tool, such as the role hierarchy, sharing rules, teams and manual sharing, can only open access beyond this baseline. None of them can take it away.
For example, if Account is set to Private, a user sees only the accounts they own. They can see others' accounts only if another mechanism grants access. If Account is set to Public Read Only, every user with Read permission on Account can see every account, but can edit only their own.
Where to find and change them
- In Setup, enter Sharing Settings in Quick Find.
- Find the Organization-Wide Defaults section.
- Click Edit, change the value for an object, and save.
Each object has its own row. You can set Account to Private and Case to Public Read/Write in the same org. Some objects, such as Contact, can also be set to Controlled by Parent, so access follows the related account.
Where OWD sits in an access check
OWD is not the first check. Object permissions come first, and OWD only matters for users who already have them.
The diagram leaves out View All and Modify All, which bypass sharing. A later chapter covers them.
How OWD affects the rows in the database
Salesforce stores the extra access it grants as rows in share tables, such as AccountShare. For a Private object, each row grants one user or group access to one record. You can see why with a query like this one:
SELECT Id, AccountId, UserOrGroupId, AccountAccessLevel, RowCause
FROM AccountShare
WHERE AccountId = '001XXXXXXXXXXXXXXX'The RowCause column tells you why the row exists, for example Owner, Team or Manual. A later chapter covers these queries in detail.
Common errors
- Expecting a sharing rule to restrict access. Sharing rules only open access. To restrict access, make the OWD more restrictive.
- Setting a loose OWD "to fix a visibility complaint". This exposes records to everyone with object permission. Keep the OWD tight and open access for specific groups.
- Forgetting object permissions. A user whose profile and permission sets lack Read on Account sees no accounts, whatever the OWD says.
- Assuming a change is instant. Changing an OWD starts a sharing recalculation. On large orgs this can take a while.
Choosing a starting point
A good default is to set each object to the most restrictive level that the most restricted user in your business needs. If any group must not see another group's records, use Private. The next chapter covers the available levels and how to choose between them.
Exercise
A user has Read permission on Opportunity through their profile. The Opportunity OWD is Private, and another user owns the record. The user is not in the owner's role hierarchy and no sharing rule applies. Can they open the record? What would change that?
Show answer
No. The OWD sets the baseline to owner-only access, and object permission alone does not grant record access. They could get access through the role hierarchy (if they sit above the owner), a sharing rule, an opportunity team or manual share, or the View All Data or View All on Opportunity permission.