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
2 months agoTomoko
2 months agoKarma
3 months agoVallie
3 months agoKeva
3 months agoRuthann
3 months agoFrancis
3 months agoShakira
4 months agoTonette
4 months agoCassi
4 months agoCordie
4 months agoRefugia
4 months agoStefania
5 months agoJohnetta
5 months agoCarin
7 months agoLauna
5 months agoBurma
6 months agoShawnta
7 months agoHobert
7 months agoElroy
7 months agoMicah
8 months agoJudy
8 months agoAlexia
8 months agoJacob
8 months agoTerrilyn
8 months agoErinn
8 months agoRebbecca
9 months agoLucy
8 months agoEdelmira
8 months agoLaurel
8 months agoShannan
8 months agoJunita
8 months ago