QuestionQ68

Programmatic Sharing

Cloud Kicks has the following environment:

  • Two custom objects named Open Position and Candidate.
  • The Candidate object has a lookup relationship to Open Position.
  • Both objects are configured as Private in sharing settings.
  • The Human Resources team will own all Open Position and Candidate records.

Cloud Kicks asks its Salesforce Architect to automatically share the Candidate record when the Interviewer (a lookup to a user record) is populated. The interviewer may be from any department.

What approach should the Architect use to meet this goal?

  • A Build Apex Managed Sharing code to share Candidate with the Interviewer user
  • B Build a workflow email notification to notify the interviewer of the record assignment
  • C Build a criteria-based sharing rule between the Candidate and the Interviewer
  • D Build a standard sharing rule between Candidate and the Interviewer
Explanation

Apex managed sharing can programmatically grant record-level access for a custom-object Candidate record to the specific User stored in the Interviewer lookup. This supports dynamic, per-record sharing even when the user is from any department and the object’s organization-wide default is Private.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!