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,
Contacts, 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 2 answers
To make an Apex method callable from a Lightning Web Component, you need to annotate the method with @AuraEnabled and mark it as cacheable if it's only retrieving data without modifying it. Additionally, the method must be public to be accessible from the component.
Line 04: Needs @AuraEnabled(cacheable=true) to allow the method to be called from the Lightning Web Component and indicate that the method doesn't modify any data, making it suitable for caching.
Line 09: The method getFiveMostRecent should not be private because private methods cannot be called from a Lightning Web Component. Changing it to public (or default, which is equivalent to public within the same namespace) is required.
Lightning Web Components and Salesforce Data: Developer Documentation
@AuraEnabled Annotation: Apex Developer Guide
Jenelle
4 months agoTomoko
4 months agoKarma
4 months agoVallie
5 months agoKeva
5 months agoRuthann
5 months agoFrancis
5 months agoShakira
5 months agoTonette
6 months agoCassi
6 months agoCordie
6 months agoRefugia
6 months agoStefania
6 months agoJohnetta
6 months agoCarin
9 months agoLauna
7 months agoBurma
8 months agoShawnta
9 months agoHobert
8 months agoElroy
8 months agoMicah
10 months agoJudy
10 months agoAlexia
10 months agoJacob
10 months agoTerrilyn
10 months agoErinn
10 months agoRebbecca
10 months agoLucy
10 months agoEdelmira
10 months agoLaurel
10 months agoShannan
10 months agoJunita
10 months ago