New Year Sale 2026! 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 6 Question 34 Discussion

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

A developer migrated functionality from JavaScript demoting to a Lightning web component and wants to use the existing getOpportunities() method to provide data.

Which modification to the method is necessary?

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

0/2000 characters
Freeman
4 months ago
I agree, cacheable=true is the way to go!
upvoted 0 times
...
Elke
4 months ago
Surprised that people still confuse LWC with Aura.
upvoted 0 times
...
Charolette
4 months ago
Definitely not a JSON Object return type!
upvoted 0 times
...
Kenia
4 months ago
I think it should be decorated with AuraEnabled.
upvoted 0 times
...
Pedro
4 months ago
The method needs to be cacheable for LWC.
upvoted 0 times
...
Carman
5 months ago
I thought the method should return a serialized JSON Array, but I'm not sure if that's the only requirement.
upvoted 0 times
...
Beckie
5 months ago
I feel like the cacheable=true option is important for performance, but I’m not completely confident if it’s necessary for this specific method.
upvoted 0 times
...
Gwenn
5 months ago
I remember practicing a question about returning data in Lightning components, but I can't recall if it has to be a JSON Object or something else.
upvoted 0 times
...
Mariko
5 months ago
I think the method needs to be decorated with something, but I'm not sure if it's AuraEnabled or cacheable.
upvoted 0 times
...
Maryann
5 months ago
This looks like a pretty straightforward JavaScript question. I'll carefully read through the code and options to determine the expected result.
upvoted 0 times
...
Maricela
5 months ago
This looks like a straightforward problem to solve using Java 8 streams. I think I can handle this.
upvoted 0 times
...
Carma
5 months ago
Okay, I think I've got it. The key is the phrase "hosted solutions with a monthly subscription fee and outsourced system maintenance." That's the definition of Software as a Service, so D is the correct answer.
upvoted 0 times
...

Save Cancel