Salesforce Certified Sharing and Visibility Architect — Question 54
Universal Containers (UC) has a team that analyzes customer orders looking for fraud. This team needs access to Invoice records (custom object, Private organization-wide default). UC has complex rules to control users' access. The architect recommended using Apex managed sharing to meet these requirements.
Which recommendation should a developer consider when implementing the changes?
Answer options
- A. Use “With Sharing” keyword to enforce Field-Level Security.
- B. Use runAs system method to test different users accessing these records.
- C. Use “Without Sharing” keyword to make sure record visibility will be considered.
Correct answer: B
Explanation
The correct answer is B because the runAs system method allows developers to test how different users would access records under the new sharing rules. Option A is incorrect because 'With Sharing' does not enforce Field-Level Security; it controls record visibility based on sharing rules. Option C is also wrong since using 'Without Sharing' would negate the effects of sharing rules altogether.