Sub topic 4
Org-wide Defaults: The Baseline for Record Access
This chapter covers org-wide defaults (OWD), the setting that decides how much access users get to records they do not own. It assumes you know basic Salesforce navigation and Setup, the standard objects (Account, Contact, Opportunity, Case), and the difference between a profile and a permission set. You also need basic SOQL for the examples.
Where OWD fits
Salesforce checks access in layers. Object permissions from profiles and permission sets decide whether a user can work with an object at all. Record-level access then decides which individual records that user can see or change.
OWD is the first record-level layer. It sets the most restrictive access any user has to records they do not own. Every other sharing tool, such as the role hierarchy, sharing rules, teams and manual shares, can only open access beyond that baseline. None of them can lock it down further.
That rule shapes the whole design process. You choose the tightest OWD the business can tolerate, then open access in controlled steps.
What OWD controls
OWD is set per object, in Setup under Sharing Settings. Each object has its own row, and the value you choose applies to all users in the org.
An OWD value answers one question: if a user has no other reason to see a record, what can they do with it? The "other reasons" are ownership, the role hierarchy, sharing rules, teams, and manual shares.
The OWD does not override object permissions. A user needs Read on Account in their profile or a permission set before any OWD value matters. If the object permission is missing, a Public Read/Write OWD gives that user nothing.
The access levels
The values you can pick depend on the object. The common ones are below.
| OWD value | What a non-owner can do | Typical use |
|---|---|---|
| Private | Nothing. Only the owner, users above the owner in the role hierarchy, and users granted access by other means can see the record. | Opportunities with confidential pricing, Cases with sensitive details |
| Public Read Only | View the record and report on it. Cannot edit. | Accounts that everyone should see but only the owning team should change |
| Public Read/Write | View, edit and report on the record. | Shared reference data that many people maintain |
| Public Read/Write/Transfer | View, edit, transfer ownership and report. Available only for Leads and Cases. | Queues where users pick up work from each other |
| Controlled by Parent | Access follows the parent record. | Contacts under Accounts, Opportunity Products, detail records in master-detail relationships |
| Public Full Access | View, edit, delete and report. Available only for Campaigns. | Open marketing collaboration |
| Use | Use the record in a lookup or filter but not see its details. Available only for Price Books. | Price books that sales users may attach to opportunities |
Two points about this table are easy to miss.
First, "Public Read/Write" does not allow deletes. Delete rights come from object permissions, ownership, or the role hierarchy, depending on the object.
Second, you can only choose values the object supports. An object on the detail side of a master-detail relationship always shows Controlled by Parent, and you cannot change it.
The Contact and Account relationship
Contacts are a common source of confusion. A Contact can be Controlled by Parent, which means its access follows the Account. It can also be Private or Public. If the Contact has no Account (a private contact), it is visible only to its owner and users above the owner in the hierarchy.
There is a further constraint between related objects. The OWD of Contact, Opportunity and Case can never be more open than the OWD of Account. If Account is Private, Opportunity cannot be Public Read/Write. Salesforce enforces this when you save the setting.
Choosing an OWD
Work from the most restrictive setting upward. For each object, ask these questions in order:
- Is there any user who must not see records they do not own? If yes, use Private.
- Do all users need to see the records, but only owners should change them? Use Public Read Only.
- Do all users need to edit the records, with no owner distinction? Use Public Read/Write.
If you have to choose between Private and a public value, choose Private and add sharing rules. You can open access later without much risk. Closing access later is harder, because users have already come to rely on it.
How OWD changes get applied
When you save a new OWD, Salesforce does not change record data. It recalculates the share rows that control access. Setup shows a notification while this runs.
During recalculation, users may see inconsistent access for a while. Loosening an OWD (Private to Public Read Only) is usually quick because Salesforce can simply grant broader access. Tightening takes longer because it must remove access that no other mechanism supports and rebuild the remaining share rows.
A worked example
Suppose a company has these settings:
- Account OWD: Public Read Only
- Opportunity OWD: Private
- Contact OWD: Controlled by Parent
Priya owns an Opportunity and Marcus does not. Both have Read and Edit on Opportunity in their profiles, and neither is above the other in the role hierarchy.
- Priya can see and edit the Opportunity, because she owns it.
- Marcus cannot see it. Private OWD blocks him, and nothing else grants access.
- Marcus can see the parent Account. Public Read Only lets every user view every account. He cannot see the Opportunity from that account's related list, because Opportunity is a separate object with its own OWD.
- Marcus can see the Contacts on that Account, because Contact access follows the Account and the Account is readable by everyone.
This example shows why OWD is set per object. A single "company-wide" setting would be too coarse.
Checking the OWD and the resulting access
You can read the current OWD in Setup under Sharing Settings. To see what access a specific user actually has to a specific record after all sharing is applied, query UserRecordAccess:
SELECT RecordId, HasReadAccess, HasEditAccess, HasDeleteAccess
FROM UserRecordAccess
WHERE UserId = '005XXXXXXXXXXXXXXX'
AND RecordId = '001XXXXXXXXXXXXXXX'This query reports the combined result of OWD, ownership, role hierarchy, sharing rules and permissions. It is the quickest way to check whether a change had the effect you wanted.
To see which share rows exist for a record, and why, query the share table:
SELECT Id, AccountId, UserOrGroupId, AccountAccessLevel, RowCause
FROM AccountShare
WHERE AccountId = '001XXXXXXXXXXXXXXX'The RowCause column tells you the reason for each row, such as Owner, Team or Manual. Rows reflect access that has been granted beyond the baseline. Records with a Public OWD may not show a row for every user who can see them, because the OWD itself provides that access without a row.
Common errors
- Expecting OWD to grant object access. A user without the Read object permission sees nothing, whatever the OWD says. Check the profile and permission sets first.
- Trying to restrict with sharing rules. Sharing rules only open access. To restrict, make the OWD more restrictive.
- Setting a child object more open than its parent. Salesforce blocks Opportunity or Contact settings that are more open than Account. Plan the Account OWD first.
- Treating Public Read/Write as "everyone can delete". It does not allow deletes.
- Changing OWD during working hours. Recalculation can leave users with temporary access differences.
- Forgetting that Controlled by Parent follows the parent. If a Contact looks wrong, check the Account first.
Summary of the model
OWD sets the floor for access to records a user does not own. Ownership, the role hierarchy and the other sharing tools raise access above that floor. Object permissions and the View All and Modify All overrides sit outside the OWD logic, because they are checked against the object rather than the individual record. The next chapters cover the access levels in more detail and then the role hierarchy, which opens access upward through the management chain.
Exercise
A company sets Opportunity OWD to Private and Account OWD to Public Read Only. Dana does not own a particular Opportunity, has Read on Opportunity in her profile, and is not above the owner in the role hierarchy. A sharing rule is not defined. Can Dana see the Opportunity? Can she see its parent Account? Explain both answers.
Show answer
Dana cannot see the Opportunity. The Private OWD gives non-owners no access, and nothing else (hierarchy, sharing rule, team, manual share) grants it. Her Read object permission only lets her use the object, not see every record. Dana can see the parent Account, because Public Read Only lets every user with Read on Account view all accounts. Opportunity and Account have separate OWDs.
Exercise
An administrator wants Contacts to be Public Read/Write while Accounts stay Private. Will Salesforce accept this? What should the administrator do instead?
Show answer
No. The Contact OWD cannot be more open than the Account OWD. The administrator should either make Contacts Private or Controlled by Parent, or open the Account OWD first if the business really allows it. If only some users need wider Contact access, a sharing rule is a safer way to open it.