Exam Plat-Dev-301 Topic 1 Question 78 Discussion
Actual exam question for Salesforce's Plat-Dev-301 exam
Question #: 78
Topic #: 1
Question #: 78
Topic #: 1
Refer to the following code snippet:

A developer created a JavaScript function as part of a Lightning web component (LWC) that surfaces information about Leads by wire calling geyFetchLeadList whencertain criteria are met. Which three changes should the developer implement in the Apex class above to ensure the LWC can display data efficiently while preserving security? Choose 3 answers

A developer created a JavaScript function as part of a Lightning web component (LWC) that surfaces information about Leads by wire calling geyFetchLeadList whencertain criteria are met. Which three changes should the developer implement in the Apex class above to ensure the LWC can display data efficiently while preserving security? Choose 3 answers
Suggested Answer: A,B,E Vote an answer
The Apex class needs to have the method annotated with @AuraEnabled to expose it to the LWC. The 'with sharing' keyword ensures that the data access is enforced according to the user's permissions. @AuraEnabled(cacheable=true) allows client-side caching for improved performance.
@AuraEnabled Annotation: Apex Developer Guide
Enforcing Sharing Rules: Apex Developer Guide
@AuraEnabled Annotation: Apex Developer Guide
Enforcing Sharing Rules: Apex Developer Guide
by Alva at Oct 13, 2026, 05:24 AM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).