Must-readApex and platform
Custom sharing reasons now roll out for standard objects alongside a setting to preserve manual shares (opens in a new tab)
You will learn how to use the new custom sharing reason feature on standard objects and configure the org-wide setting that keeps manual shares intact during record transfers.
Why read this
The article provides exact metadata and Apex examples so you can implement these changes immediately.
Keep Manual Shares
- Available immediately in Sharing Settings
- Keeps user manual shares after ownership changes
- Best for teams relying on manual distribution
Custom Row Causes
- Rolls out via Metadata API through October
- Defines programmatic sharing reasons in code
- Best for developers using Apex or Flow
Salesforce is introducing two enhancements to the sharing model that eliminate long-standing workarounds for standard object access control. The first is an org-wide toggle called Keep Manual Shares when Transferring Records, which is available immediately in Sharing Settings. Enabling it ensures that manual shares survive ownership changes without requiring custom code or triggers.
The second enhancement rolls out through October and allows developers to define custom row causes on standard objects using the Metadata API. Previously, Apex managed sharing was restricted to Custom Objects. The update lets you declare a sharing reason like On Call Expert directly in the CustomObject metadata, then reference it in Apex share records or Flow actions. This separation keeps programmatic shares distinct from user manual shares and prevents automatic deletion when owners change.
The guidance recommends evaluating existing code that creates CaseShare, AccountShare, or similar records. Teams building shares via Apex or Flow should migrate to custom row causes to maintain auditability and stability. Those relying purely on manual distribution can simply enable the preservation setting. Both features arrive ahead of November updates that will bring management capabilities to Agentforce and Setup.
Read the original at Salesforce Developers Blog (opens in a new tab)