Salesforce Certified Sharing and Visibility Architect — Question 17
Which functionality does the system method “runAs()” verify when writing test methods?
Answer options
- A. Enforcement of a user's record sharing
- B. Enforcement of a user's permissions
- C. Enforcement of a user's Field-Level Security
Correct answer: A
Explanation
'runAs()' is used in test methods to simulate the context of a specific user, ensuring that record sharing rules are applied correctly. While user permissions and field-level security are important, they are not the primary focus of the 'runAs()' method, which is specifically designed to validate record sharing enforcement.