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

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?
B) Schema,sObjectType,Account, isDeletable ()
A) accountRec, isDeletable()
C) accuntRec, sObjectType,isDeletable()
D) Account,isDeleteable

Salesforce DEX-450 Exam - Topic 4 Question 109 Discussion

Actual exam question for Salesforce's DEX-450 exam
Question #: 109
Topic #: 4
[All DEX-450 Questions]

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?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

0/2000 characters
Dana
6 months ago
C has a typo, so it can't be right.
upvoted 0 times
...
Judy
6 months ago
Definitely B, can't go wrong with that!
upvoted 0 times
...
Inocencia
7 months ago
Wait, is "isDeletable" even a real method?
upvoted 0 times
...
Sharan
7 months ago
I think A is better, but B works too.
upvoted 0 times
...
Dyan
7 months ago
Option B is the right choice!
upvoted 0 times
...
Twanna
7 months 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.
upvoted 0 times
...
Jaime
8 months ago
I practiced a similar question, and I feel like the method should involve the sObjectType, but I can't recall the exact syntax.
upvoted 0 times
...
Mona
8 months ago
I think option B sounds familiar because it references Schema and checking if an Account is deletable. That seems right.
upvoted 0 times
...
Vivan
8 months ago
I remember something about checking permissions before performing deletions, but I'm not sure which method to use here.
upvoted 0 times
...
Quiana
8 months ago
This seems straightforward. I'll just use the Account.isDeleteable method to check if the user can delete the Account.
upvoted 0 times
...
Avery
8 months 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.
upvoted 0 times
...
Talia
8 months ago
I'm a bit confused by this question. I'm not sure which method is the best one to use here.
upvoted 0 times
...
Haydee
8 months ago
Okay, I think I know the answer to this. I'll use the Schema.sObjectType method to check the deletability of the Account.
upvoted 0 times
...
Edgar
8 months ago
Hmm, this looks like a tricky one. I'll need to think carefully about the best way to approach this.
upvoted 0 times
...
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*
upvoted 0 times
...
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!
upvoted 0 times
Boris
12 months ago
Definitely, we don't want just anyone deleting important data like Accounts. Safety measures are key.
upvoted 0 times
...
Allene
12 months ago
I agree, it's better to use the Schema class to check if the user has permission to delete the Account.
upvoted 0 times
...
Layla
1 year ago
B) Schema,sObjectType,Account, isDeletable ()
upvoted 0 times
...
...
Anna
1 year 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!
upvoted 0 times
Alida
12 months ago
We should always prioritize security when writing Apex methods that involve deleting sensitive data like Accounts.
upvoted 0 times
...
Bettina
1 year ago
Definitely, using Schema.sObjectType.Account.isDeletable() is the best way to handle deletions securely.
upvoted 0 times
...
Jerilyn
1 year ago
I agree, option B is the safest choice to ensure only authorized users can delete Accounts.
upvoted 0 times
...
...
Clorinda
1 year 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!
upvoted 0 times
Aretha
12 months ago
C) accuntRec, sObjectType,isDeletable()
upvoted 0 times
...
Alise
1 year ago
B) Schema,sObjectType,Account, isDeletable ()
upvoted 0 times
...
Teri
1 year ago
A) accountRec, isDeletable()
upvoted 0 times
...
...
Sang
1 year 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.
upvoted 0 times
...
Joaquin
1 year 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.
upvoted 0 times
Lavonna
1 year ago
User 2: Agreed, that seems like the most accurate way to ensure only authorized users can delete Accounts.
upvoted 0 times
...
Ilene
1 year ago
User 1: I think we should use option B to check permissions at the schema level.
upvoted 0 times
...
...
Wilbert
1 year ago
I agree with Kimberlie. Using Schema,sObjectType,Account, isDeletable() ensures that only users with delete permissions can delete the Account.
upvoted 0 times
...
Kimberlie
1 year ago
I think the correct method is B) Schema,sObjectType,Account, isDeletable(). It checks if the current user has permission to delete the Account.
upvoted 0 times
...

Save Cancel