nerdexam
Salesforce

PDII · Question #347

A developer created a Lightning web component for the Account record page that displays the five most recently contacted Contacts for an Account. The Apex method, getRecentContacts, returns a list…

The correct answer is A. Add public to line 04. B. Add @AauraEnabled(cacheable=true) to line 03. See the full explanation below for the reasoning.

Question

A developer created a Lightning web component for the Account record page that displays the five most recently contacted Contacts for an Account. The Apex method, getRecentContacts, returns a list of Contacts and will be wired to a property in the component. Which two lines must change in the above code to make the Apex method able to be wired? (Choose two.)

Exhibit

PDII question #347 exhibit

Options

  • AAdd public to line 04.
  • BAdd @AauraEnabled(cacheable=true) to line 03.
  • CAdd @AuraEnabled(cacheable=true) to line 08.
  • DRemove private from line 09.

How the community answered

(64 responses)
  • A
    75% (48)
  • C
    8% (5)
  • D
    17% (11)

Community Discussion

No community discussion yet for this question.

Full PDII Practice