Salesforce
PDII · Question #386
Consider the Apex controller below, that is called from an Aura component. What is wrong with this code?
The correct answer is C. Line 6: method must be static. See the full explanation below for the reasoning.
Question
Consider the Apex controller below, that is called from an Aura component. What is wrong with this code?
Exhibit
Options
- ALine 1: class must be global
- BLines 1 and 6: class and method must be global
- CLine 6: method must be static
- DLine 8: method must first serialize the list to JSON before returning
How the community answered
(47 responses)- A13% (6)
- B4% (2)
- C77% (36)
- D6% (3)
Community Discussion
No community discussion yet for this question.
