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 Certified Platform Developer II (Plat-Dev-301) Exam - Topic 2 Question 121 Discussion

Actual exam question for Salesforce's Salesforce Certified Platform Developer II (Plat-Dev-301) exam
Question #: 121
Topic #: 2
[All Salesforce Certified Platform Developer II (Plat-Dev-301) Questions]

A developer created a Lightning web component mat allows users to Input a text value that is used to search for Accounts by calling an Apex method. The Apex method returns a list of account to apply and is called imperatively from a JavaScript event handler.

Which two changes should the developer make so the Apex method functions correctly.

Choose 2 answers

Show Suggested Answer Hide Answer
Suggested Answer: B, C

Contribute your Thoughts:

0/2000 characters
Ryan
5 days ago
True, but we need to ensure all lines are covered for best practice.
upvoted 0 times
...
Ronny
10 days ago
C might not be needed if A is added.
upvoted 0 times
...
Vashti
15 days ago
I’m leaning towards A and C. They seem necessary for the method.
upvoted 0 times
...
Reena
20 days ago
Why not D? It could help with accessibility.
upvoted 0 times
...
Ryan
25 days ago
I agree, but I also feel option B is important too.
upvoted 0 times
...
Ronny
1 month ago
I think option A is crucial. It needs @AuraEnabled to work.
upvoted 0 times
...
Cecily
1 month ago
I’m surprised there’s so much debate over this!
upvoted 0 times
...
Brigette
2 months ago
Agreed, line 01 makes the most sense for accessibility.
upvoted 0 times
...
Refugia
2 months ago
Wait, is this a trick question? I'm going with B and C, just to be safe.
upvoted 0 times
...
Shenika
2 months ago
Haha, I bet the developer was scratching their head on this one. B and C are the way to go!
upvoted 0 times
...
Val
2 months ago
Hmm, I was thinking D, but B and C make more sense. Apex can be tricky sometimes.
upvoted 0 times
...
Bobbie
3 months ago
I agree, B and C are the way to go. Gotta love that Apex method!
upvoted 0 times
...
Delila
3 months ago
B and C are the correct answers.
upvoted 0 times
...
Lawrence
3 months ago
I think we need to add @AuraEnabled to the method itself and possibly the parameters. I remember something about making sure the method is accessible from the LWC.
upvoted 0 times
...
Claudia
3 months ago
I’m a bit confused about which lines need the annotation. I thought it was only necessary for the method, but maybe it also applies to the return type?
upvoted 0 times
...
Maxima
3 months ago
This question feels similar to one we practiced where we had to enable an Apex method for LWC. I think it might be line 03 since that's where the method signature is.
upvoted 0 times
...
Lynda
3 months ago
I remember we discussed the importance of the @AuraEnabled annotation for Apex methods, but I'm not sure if it should be on the method itself or just the parameters.
upvoted 0 times
...
Dortha
4 months ago
This seems straightforward. The Apex method is being called from the Lightning web component, so it needs to be marked as @AuraEnabled. I'd go with option B or C to make the necessary changes.
upvoted 0 times
...
Kyoko
4 months ago
I'm a bit confused here. The question mentions the component, but the code snippet doesn't show the component. I'll need to make sure I understand the full context before deciding on the changes.
upvoted 0 times
...
Novella
4 months ago
Wait, why would you add it to line 03? That seems off.
upvoted 0 times
...
Selma
4 months ago
I think line 09 is the right place for @AuraEnabled.
upvoted 0 times
...
Winfred
5 months ago
Definitely need @AuraEnabled on line 01.
upvoted 0 times
...
Jerilyn
5 months ago
I think the key is to identify which part of the Apex code needs to be marked as @AuraEnabled. Based on the options, it seems like either the method itself or the parameters/return type need to be annotated.
upvoted 0 times
...
Myra
5 months ago
Okay, let's see. The question mentions the Apex method being called imperatively, so I'm guessing the issue is with the method not being marked as @AuraEnabled.
upvoted 0 times
...
Brittni
5 months ago
Hmm, this looks like a tricky one. I'll need to carefully review the code to identify the issue and the appropriate changes.
upvoted 0 times
Carissa
4 months ago
I think adding @AuraEnabled to line 01 is crucial.
upvoted 0 times
...
...

Save Cancel