Exam PDII Topic 1 Question 187 Discussion
Actual exam question for Salesforce's PDII exam
Question #: 187
Topic #: 1
Question #: 187
Topic #: 1
Consider the Apex controller below, that is called from an Aura component.

What is wrong with this code?

What is wrong with this code?
Suggested Answer: C Vote an answer
The method defined in the Apex class must be static to be used as an Aura-enabled method. Aura-enabled methods need to be static because they are called by the Lightning framework without instantiating the class.
References: Apex Developer Guide - Exposing Apex Methods to Lightning
References: Apex Developer Guide - Exposing Apex Methods to Lightning
by Wordsworth at Dec 05, 2025, 04:19 AM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).