Access to Records39% of the exam

Apex managed sharing, share objects and sharing reasons

When code is the right way to share records and when a declarative tool already fits, what a share object stores (and what it never stores), how row causes decide who can change a share and whether it survives an owner change, and how recalculation keeps Apex shares correct.

Official exam objective
Given a set of conditions, determine how programmatic sharing supports the record access requirements.

~8 min read · 13 practice questions ·

What the exam expects

  • Decide when a requirement needs programmatic sharing and when a sharing rule, guest user sharing rule or team already meets it.
  • Read a share object: its fields, access levels and what it never records.
  • Choose the Manual row cause or an Apex sharing reason, and predict each on an owner or default change.
  • Plan recalculation and the constraints Apex shares put on the default.
  • Predict how the surrounding class's sharing keyword changes the result, with the API version stated.

Key terms: share object (an object's access-control table, such as Job__Share); RowCause (why a share row exists, shown as Reason); Apex sharing reason (a developer-defined RowCause on a custom object); Apex managed sharing (shares written by code with an Apex sharing reason); recalculation class (a batch class that rebuilds Apex shares).

Key facts

Detail side of master-detail
Detail
No share object
Not in share objects
Detail
Default, role hierarchy, View All/Modify All Records, View All/Modify All Data
Grantable levels
Detail
Read or Edit, above the default; All is internal
Read-only fields
Detail
ParentId, UserOrGroupId, RowCause
Default RowCause from Apex
Detail
Manual; deleted on owner change
Apex sharing reason
Detail
Custom objects only; kept on owner change; created in Classic
Changing Apex managed shares
Detail
Modify All Data only
Guest users
Detail
No Apex or manual shares; guest user sharing rules only
Default change
Detail
Redundant shares removed; recalculation classes run
Default lock
Detail
Private can't go public while Apex uses the share entries
Sources for this section (5)
  • Why does an AccountShare export understate who can see accounts?
  • When does Salesforce run an object's Apex recalculation class without anyone clicking it?
  • Why can't a public site show records to visitors through a trigger that writes share rows?
  • Where is an Apex sharing reason created?

The questions are free to read. Answers with their sources and self-grading are included with the pack.

Keep reading with the Platform Sharing and Visibility Architect pack

  • Core concepts
  • Exam traps
  • Worked scenario

The pack includes:

  • All 21 lessons of the Platform Sharing and Visibility Architect guide, with reading progress
  • Interactive decision walks and step-by-step sequence steppers
  • Inline practice questions and one-click topic practice (13 questions for this lesson)
  • An official source cited for every claim
  • An AI tutor that answers from the guide
  • Unlimited timed practice exams

Practice for the Platform Sharing and Visibility Architect exam