Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Certified Platform Developer II All Questions

View all questions & answers for the Certified Platform Developer II exam

Exam Certified Platform Developer II topic 1 question 306 discussion

Actual exam question from Salesforce's Certified Platform Developer II
Question #: 306
Topic #: 1
[All Certified Platform Developer II Questions]

Refer to the code below:



A developer is building this Aura component to display information about top Opportunities in the org.

Which three code changes must be made for the component to work? (Choose three.)

  • A. Add the static keyword to the Apex method.
  • B. Add the RemoteAction annotation to the Apex method.
  • C. Set the controller in the component markup.
  • D. Get the controller action with cmp.get("OppController.getTopOpps").
  • E. Add the AuraEnabled annotation to the Apex method.
Show Suggested Answer Hide Answer
Suggested Answer: ACE 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
rufusroffie
Highly Voted 1 year, 8 months ago
Selected Answer: ACE
answer is ACE B is wrong, because RemoteAction is only for Visualforce page, this is Aura Component D is wrong, because there's already a cmp.get(), use "c.method" to get the controller method this component doesnt have controller attribute, so yes add controller the apex method doesnt have static or @AuraEnabled, both are required. so ACE
upvoted 6 times
...
stan_malta
Most Recent 1 year ago
Selected Answer: ACE
Can just repeat what rufusroffie said
upvoted 3 times
...
Sapphire808
1 year, 1 month ago
B - aura components are inclusive of visualforce and lwc, therefore RemoteAction cannot be ruled out since the type of aura component is not specified. C - The call to the method is not set correctly and must be corrected to call the apex class followed by the method. E - to allow for communication, apex class methods have to be decorated with aura enabled, especially since the class is being called in the controller (explained for answer b) then it must be decorated with aura enabled.
upvoted 1 times
Sapphire808
1 year, 1 month ago
CORRECTED TEXT B - aura components are inclusive of visualforce and lwc, therefore RemoteAction cannot be ruled out since the type of aura component is not specified. D - The call to the method is not set correctly and must be corrected to call the apex class followed by the method. E - to allow for communication, apex class methods have to be decorated with aura enabled, especially since the class is being called in the controller (explained for answer d) then it must be decorated with aura enabled.
upvoted 1 times
...
...
AppleDash
1 year, 8 months ago
ABC https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_RemoteAction.htm
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

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.

SaveCancel
Loading ...