Salesforce Certified Sharing and Visibility Designer — Question 9

Cloud Kicks has the following setup and requirements:
A strict software architecture for their custom Apex code.
All SOQL queries must be contained within reusable classes.
Depending on the context of the Apex transaction, the queries should be able to run either “With Sharing” or “Without Sharing”.
What are two methods for meeting these requirements? (Choose two.)

Answer options

Correct answer: A, D

Explanation

Option A is correct because it effectively segregates the SOQL queries into classes that can individually manage their sharing settings. Option D is also correct as it allows for the creation of a reusable class without specifying sharing settings, which can be useful in certain contexts. Options B and C do not meet the requirement of containing SOQL queries within classes that explicitly manage sharing settings as specified in the question.