Programmatic sharing Flashcards Preview

CTA - Sharing, Visibility & Security > Programmatic sharing > Flashcards

Flashcards in Programmatic sharing Deck (3)
Loading flashcards...

Programmatic sharing use cases?

  • No other method of sharing (declarative) meets the data access needs.
  • There is an existing, external system of truth for user access assignments which will continue to drive access and be integrated with Salesforce.
  • Poor performance by using native sharing components. (Usually applies to very large data volumes)
  • Team functionality on custom objects.


What is needed to maintain a programmatic share record using the Share button on the UI?

the ROW Cause field value in the SHARE Object should be set to "Manual Share". The share record is subject to all rules with the manual share row cause such as deletion upon owner transfer.



Important FAQ

  • The “Modify All Data” permission is required to add, edit, or delete sharing that uses an Apex sharing reason.
  • Deleting an Apex sharing reason will delete all sharing on the object that uses the reason.
  • Objects are limited to 10 Apex sharing reasons.
  • Metadata API can create Apex sharing reasons.