Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce DEX-450 Exam - Topic 4 Question 109 Discussion

Posted by Oretha on Feb 09, 2025 at 03:54 AM

A developer must write an Apex 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 deletions?

Suggested Answer: B

Get Premium DEX-450 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
33 comments · newest first
DA
Dana 11 months ago
C has a typo, so it can't be right.
JU
Judy 11 months ago
Definitely B, can't go wrong with that!
IN
Inocencia 12 months ago
Wait, is "isDeletable" even a real method?
SH
Sharan 12 months ago
I think A is better, but B works too.
DY
Dyan 1 year ago
Option B is the right choice!
TW
Twanna 1 year ago
I’m leaning towards option A, but I’m not confident. I feel like I need to double-check how isDeletable() works with accountRec.
JA
Jaime 1 year ago
I practiced a similar question, and I feel like the method should involve the sObjectType, but I can't recall the exact syntax.
MO
Mona 1 year ago
I think option B sounds familiar because it references Schema and checking if an Account is deletable. That seems right.
VI
Vivan 1 year ago
I remember something about checking permissions before performing deletions, but I'm not sure which method to use here.
QU
Quiana 1 year ago
This seems straightforward. I'll just use the Account.isDeleteable method to check if the user can delete the Account.
AV
Avery 1 year ago
I've got a strategy for this. I'll use the isDeletable() method on the accountRec variable to ensure only authorized users can delete the Account.
TA
Talia 1 year ago
I'm a bit confused by this question. I'm not sure which method is the best one to use here.
HA
Haydee 1 year ago
Okay, I think I know the answer to this. I'll use the Schema.sObjectType method to check the deletability of the Account.
ED
Edgar 1 year ago
Hmm, this looks like a tricky one. I'll need to think carefully about the best way to approach this.
AR
Arlyne 1 year ago
Option B is the only option that makes sense. Unless you want your users accidentally deleting the entire company's accounts, that is. *laughs nervously*
VE
Veronique 1 year ago
Option B is the way to go. Can't be too careful when it comes to deleting data, especially for important objects like Accounts. Safety first, even in exams!
BO
Boris 1 year ago
↳ replying to Veronique
Definitely, we don't want just anyone deleting important data like Accounts. Safety measures are key.
AL
Allene 1 year ago
↳ replying to Veronique
I agree, it's better to use the Schema class to check if the user has permission to delete the Account.
LA
Layla 1 year ago
↳ replying to Veronique
B) Schema,sObjectType,Account, isDeletable ()
AN
Anna 2 years ago
Option B for sure. Anything else would be a security breach waiting to happen. I'm not trying to get fired over a silly deletion mistake!
AL
Alida 1 year ago
↳ replying to Anna
We should always prioritize security when writing Apex methods that involve deleting sensitive data like Accounts.
BE
Bettina 1 year ago
↳ replying to Anna
Definitely, using Schema.sObjectType.Account.isDeletable() is the best way to handle deletions securely.
JE
Jerilyn 1 year ago
↳ replying to Anna
I agree, option B is the safest choice to ensure only authorized users can delete Accounts.
CL
Clorinda 2 years ago
I was going to say Option D, but then I realized that 'isDeleteable' is not a valid method. Gotta love those typos in certification questions!
AR
Aretha 1 year ago
↳ replying to Clorinda
C) accuntRec, sObjectType,isDeletable()
AL
Alise 1 year ago
↳ replying to Clorinda
B) Schema,sObjectType,Account, isDeletable ()
TE
Teri 1 year ago
↳ replying to Clorinda
A) accountRec, isDeletable()
SA
Sang 2 years ago
I'm not sure, but I think option A) accountRec, isDeletable() might also work. It directly checks if the Account in accountRec can be deleted.
JO
Joaquin 2 years ago
Option B looks the most complete and accurate to me. We need to check the permissions at the schema level, not just the instance level.
LA
Lavonna 1 year ago
↳ replying to Joaquin
User 2: Agreed, that seems like the most accurate way to ensure only authorized users can delete Accounts.
IL
Ilene 1 year ago
↳ replying to Joaquin
User 1: I think we should use option B to check permissions at the schema level.
WI
Wilbert 2 years ago
I agree with Kimberlie. Using Schema,sObjectType,Account, isDeletable() ensures that only users with delete permissions can delete the Account.
KI
Kimberlie 2 years ago
I think the correct method is B) Schema,sObjectType,Account, isDeletable(). It checks if the current user has permission to delete the Account.
0/2000 characters

Save Cancel