nerdexam
Salesforce

PDII · Question #287

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?…

The correct answer is A. Add the static keyword to the Apex method. C. Set the controller in the component markup. E. Add the AuraEnabled annotation to the Apex method. See the full explanation below for the reasoning.

Question

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.)

Exhibit

PDII question #287 exhibit

Options

  • AAdd the static keyword to the Apex method.
  • BAdd the RemoteAction annotation to the Apex method.
  • CSet the controller in the component markup.
  • DGet the controller action with cmp.get("OppController.getTopOpps").
  • EAdd the AuraEnabled annotation to the Apex method.

How the community answered

(27 responses)
  • A
    81% (22)
  • B
    7% (2)
  • D
    11% (3)

Community Discussion

No community discussion yet for this question.

Full PDII Practice