PrepAway - Latest Free Exam Questions & Answers

Cloud Kicks has the following setup and requirements:

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.)

A. 1. Create a SystemSOQLQueries class and a UserSOQLQueries class.
2. Set the “With Sharing” keyword on the UserSOQLQueries class and “Without Sharing” on the SystemSOQLQueries class.

B. 1. Create a reusable SOQLQueries class.
2. Specify “With Sharing” on the methods that require user context and “Without Sharing” on the methods requiring system context.

C. 1. Create a reusable SOQLQueries class.
2. Do NOT specify “With” or “Without Sharing” on the SOQLQueries class and use the runAs() method to dynamically set the context.
D. 1. Create a reusable SOQLQueries class.
2. Do NOT specify “With” or “Without Sharing” on the SOQLQueries class.


Leave a Reply