nerdexam
Salesforce

PDI · Question #116

Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developed with Apex to help sales representatives find accounts that match multiple cr

Sign in or unlock PDI to reveal the answer and full explanation for question #116. The question stem and answer options stay visible for context.

Submitted by cyberguy42· Apr 18, 2026Logic and Process Automation

Question

Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developed with Apex to help sales representatives find accounts that match multiple criteria they specify. Since its release, users of the tool report they can see Accounts they do not own. What should the developer use to enforce sharing permission for the currently logged-in user while using the custom search tool?

Options

  • AUse the schema describe calls to determine if the logged-in users has access to the Account
  • BUse the without sharing keyword on the class declaration.
  • CUse the UserInfo Apex class to filter all SOQL queries to returned records owned by the logged-in
  • DUse the with sharing keyword on the class declaration.

Unlock PDI to see the answer

You've previewed enough free PDI questions. Unlock PDI for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#Apex#Security#Sharing#with sharing keyword
Full PDI Practice