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

Universal Containers would like to create a custom team solution that can be used on a custom Loan object. The following requirements must be met…

Full set: 212 questions
Universal Containers would like to create a custom team solution that can be used on a custom Loan object. The following requirements must be met: The Loan custom object should be set to Private in the Org-Wide Defaults. Any user added to the Custom Team object should have Read Only access to the corresponding Loan record. If the Custom Team record is marked as "Primary" then the corresponding user should have Read/Edit access to the corresponding Loan record. Which two methods will allow the Architect to meet the requirements? Choose 2 answers.
Answer options
A: Create a custom trigger on the Custom Team object that inserts or updates records in the Loan_share object. Correct answer
B: Create​​a​​criteria-based​​sharing​​rule​​on​​the​​Loan​​object​​that​​will​​share​​the​​Loan​​record​​with​​the appropriate​​user​​in​​the​​Custom​​Team​​object.
C: Create Apex Sharing Reasons on the Loan object to identify the reason the Loan record was share. Correct answer
D: Create​​an​​owner-based​​sharing​​rule​​on​​the​​Custom​​Team​​object​​that​​will​​share​​the​​Loan​​record​​to​ ​the owner​​of​​​the​​Custom​​Team​​record. ​
Correct Answer:
A. Create a custom trigger on the Custom Team object that inserts or updates records in the Loan_share object.; C. Create Apex Sharing Reasons on the Loan object to identify the reason the Loan record was share.
Explanation

The requirements call for a dynamic sharing solution where access level (Read Only vs. Read/Edit) depends on a field on a related custom object. This cannot be achieved with declarative sharing rules. Apex managed sharing is required. A trigger on the Custom Team object (A) can create or update share records in the Loan object's share table (LoanShare), granting the appropriate access level. Using Apex Sharing Reasons (C) is a best practice to label these programmatically created shares, making them easier to identify and manage, and to allow users to see why they have access.

Why Incorrect

B. Criteria-based sharing rules are static. They cannot dynamically grant different access levels (Read vs. Edit) based on a field value in a related record.
D. Owner-based sharing rules share records based on the record owner's role or group membership, not based on users listed in a related custom object.

References

1. Salesforce Developer Documentation, Apex Developer Guide, "Apex Managed Sharing". This guide explains how to use Apex to programmatically insert, update, and delete records in an object's share table to implement complex sharing logic.

2. Salesforce Developer Documentation, Apex Developer Guide, "Creating Apex Sharing Reasons". This section details how to define custom sharing reasons to track why a record was shared via Apex.

3. Salesforce Help, Salesforce Security Guide, "Sharing Rules". This document outlines the capabilities and limitations of declarative sharing rules, which do not support the dynamic, multi-level access required here.

Scroll to Top