nerdexam
SalesforceSalesforce

PDI · Question #109

PDI Question #109: Real Exam Question with Answer & Explanation

The correct answer is D: Schena, sobjectType, Account, isDeletetable (). To ensure an Apex method respects user permissions before deleting an Account, the developer must use Schema.sObjectType.Account.isDeletable() to check if the current user has delete access on the Account object.

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

Question

A developer must write anApex method that will be called from a lightning component. The method may delete an Account stored in the accountRec variable. Which method should a developer use to ensure only users that should be able to delete Accounts can successfully perform deletion?

Options

  • AaccountRec., isDeletable()
  • BAccount, isDeletable ()
  • CAccountRec, ObjecType, ieDeletable ()
  • DSchena, sobjectType, Account, isDeletetable ()

Explanation

To ensure an Apex method respects user permissions before deleting an Account, the developer must use Schema.sObjectType.Account.isDeletable() to check if the current user has delete access on the Account object.

Common mistakes.

  • A. accountRec.isDeletable() is not a valid Apex method for checking delete permissions on a specific SObject record variable.
  • B. Account.isDeletable() is incomplete and incorrect syntax for checking object-level delete permissions; it should be accessed through Schema.sObjectType.
  • C. AccountRec.ObjecType.isDeletable() contains a typo (ObjecType) and incorrect syntax for checking delete permissions.

Concept tested. Apex security and CRUD/FLS checks

Reference. https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_sobject_describe.htm

Topics

#Apex Security#CRUD/FLS#Schema Methods

Community Discussion

No community discussion yet for this question.

Full PDI PracticeBrowse All PDI Questions