nerdexam
Salesforce

CRT-450 · Question #9

A Lightning component has a wired property, searchResults, that stores a list of Opportunities. Which definition of the Apex method, to which the searchResults property is wired, should be used?

The correct answer is A. @AuraEnabled(cacheable=true). See the full explanation below for the reasoning.

Question

A Lightning component has a wired property, searchResults, that stores a list of Opportunities. Which definition of the Apex method, to which the searchResults property is wired, should be used?

Options

  • A@AuraEnabled(cacheable=true)
  • B@AuraEnabled(cacheable=true) public List<Opportunity> search(String term)
  • C@AuraEnabled(cacheable=false) public static List<Opportunity> search(String term)
  • D@AuraEnabled(cacheable=false) public List<Opportunity> search(String term)

How the community answered

(29 responses)
  • A
    79% (23)
  • B
    7% (2)
  • C
    3% (1)
  • D
    10% (3)

Community Discussion

No community discussion yet for this question.

Full CRT-450 Practice