Salesforce
CRT-450 · Question #8
A developer migrated functionality from JavaScript Remoting to a Lightning web component and wants to use the existing getOpportunities() method to provide data. What to do now?
The correct answer is A. The method must be decorated with (cacheable=true). See the full explanation below for the reasoning.
Question
A developer migrated functionality from JavaScript Remoting to a Lightning web component and wants to use the existing getOpportunities() method to provide data. What to do now?
Options
- AThe method must be decorated with (cacheable=true).
- BThe method must be decorated with @AuraEnabled.
- CThe method must return a JSON Object.
- DThe method must return a String of a serialized JSON Array.
How the community answered
(52 responses)- A77% (40)
- B4% (2)
- C6% (3)
- D13% (7)
Community Discussion
No community discussion yet for this question.