nerdexam
Salesforce

PDII · Question #347

PDII Question #347: Real Exam Question with Answer & Explanation

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.

Community Discussion

No community discussion yet for this question.

Full PDII Practice