nerdexam
Salesforce

PDI · Question #109

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…

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

How the community answered

(31 responses)
  • A
    3% (1)
  • B
    10% (3)
  • C
    13% (4)
  • D
    74% (23)

Why each option

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.

AaccountRec., isDeletable()

`accountRec.isDeletable()` is not a valid Apex method for checking delete permissions on a specific SObject record variable.

BAccount, isDeletable ()

`Account.isDeletable()` is incomplete and incorrect syntax for checking object-level delete permissions; it should be accessed through `Schema.sObjectType`.

CAccountRec, ObjecType, ieDeletable ()

`AccountRec.ObjecType.isDeletable()` contains a typo (`ObjecType`) and incorrect syntax for checking delete permissions.

DSchena, sobjectType, Account, isDeletetable ()Correct

`Schema.sObjectType.Account.isDeletable()` is the correct way to perform field-level and object-level security checks in Apex to determine if the current user has permission to delete records of the Account object type, ensuring the delete operation respects the user's profile and permission sets.

Concept tested: Apex security and CRUD/FLS checks

Source: 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 Practice