Plat-Dev-201 practice question 20 of 30
In the following example, which sharing context will myMethod execute when it is invoked?
Full set: 204 questionsDeclaring a class or method with the keyword without sharing explicitly turns off enforcement of the caller’s or the running user’s sharing rules. Therefore, when myMethod is invoked it executes in system context, ignoring all record-level sharing rules for the user.
A. Instantiating class’s sharing is irrelevant once without sharing is specified.
B. without sharing disables enforcement for the running user.
D. Inheritance occurs only when no sharing keyword is specified; here it is explicitly without sharing.
1. Salesforce Apex Developer Guide, Winter ’24, section “With Sharing and Without Sharing Keywords,” para. “Effect of without sharing”.
2. Trailhead Module “Apex Security and Sharing,” unit “Run Apex Without Sharing,” bullet 2.
Keep practicing
Take the free Plat-Dev-201 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other Plat-Dev-201 practice questions
- Question 1Which three steps allow a custom Scalable Vector Graphic (SVG) to be included in a Lightn…
- Question 2Which two statements are true about using the @testSetup annotation in an Apex test class…
- Question 3Managers at Universal Containers want to ensure that only decommissioned containers are a…
- Question 4Universal Containers has a Visualforce page that displays a table of every Container__c b…
- Question 5A developer is alerted to an issue with a custom Apex trigger that is causing records to …
- Question 6Which two operations affect the number of times a trigger can fire? Choose 2 answers
