SHARING-AND-VISIBILITY-DESIGNER practice question 8 of 30

Universal Containers has the following requirements: A custom Loan object requires Org-Wide Defaults set to Private. The owner of the Loan record…

Full set: 212 questions
Universal Containers has the following requirements: A custom Loan object requires Org-Wide Defaults set to Private. The owner of the Loan record will be the Loan Origination Officer. The Loan record must be shared with a specific Underwriter on a loan-by-loan basis. The Underwriters should only see the Loan records for which they are assigned. What should the Architect recommend to meet these requirements?
Answer options
A: Use criteria-based sharing rules to share the Loan object with the Underwriter based upon the criteria defined in the criteria-based sharing
B: Create a lookup relationship from the Loan object to the User object. Use a trigger on the Loan object to create the corresponding record in the Loan share object Correct answer
C: Create a master-detail relationship from the Loan to the User object. Loan records will be automatically shared with the Underwriter
D: Create an Apex Sharing Reason on the Loan object that shares the Loan with the Underwriter based upon the criteria defined in the Sharing Reason
Correct Answer:
B. Create a lookup relationship from the Loan object to the User object. Use a trigger on the Loan object to create the corresponding record in the Loan share object
Explanation

With OWD = Private, one-off access must be granted explicitly. Create a Loanc lookup to User (Underwriterc). A trigger (or Flow) inserts a LoanShare row whose RowCause = custom Apex Sharing Reason and UserOrGroupId = Underwriterc. The Loan owner remains the Loan Origination Officer; the designated Underwriter sees only the Loans shared to them.

Why Incorrect

A. Criteria-based rules can’t target an arbitrary single user per record.
C. User cannot be the master in a master-detail relationship; and it would transfer ownership control.
D. Apex Sharing Reason defines RowCause, but you still need code to insert the share; option omits that mechanism.

References

1. Salesforce Security Guide, “Designing Record Access for Private Data,” pp. 216-218.

2. Salesforce Developer Guide, “Creating Custom Share Records with Apex,” code sample – per-record user access.

3. Trailhead Module “Data Security,” unit “Programmatic Sharing,” section “Sharing with Specific Users.”

Scroll to Top