List of questions
Related questions
Question 115 - Certified Sharing and Visibility Architect discussion
Universal Containers has implemented a strict software architecture for their custom Apex code. One of the requirements is that all SOQL queries are 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'. Which two ways allow the Architect to meet these requirements?
Choose 2 answers.
A.
Create a reusable SOQLQueries class; do not specify 'With' or 'Without Sharing' on the SOQLQueries class.
B.
Create a reusable SOQLQueries class; do not specify 'With' or 'Without Sharing' on the SOQLQueries class and use the runAs() method to dynamically set the context.
C.
Create a reusable SOQLQueries class; specify 'With Sharing' on the methods that require user context and 'Without Sharing' on the methods requiring system context.
D.
Create a SystemSOQLQueries class and a UserSOQLQueries class; set the 'With Sharing' keyword on the User SOQLQueries class and 'Without Sharing' on the SystemSOQLQueries class.
Your answer:
0 comments
Sorted by
Leave a comment first