Question 1 of 30
In a Salesforce development environment, a developer is tasked with creating a custom Lightning component that retrieves and displays a list of accounts based on specific criteria. The component must utilize Apex to fetch the data and should be designed to handle large datasets efficiently. Which approach should the developer take to ensure optimal performance and user experience while adhering to best practices in Salesforce development?
Implement pagination in the Apex controller to limit the number of records retrieved at once and use the Lightning Data Service to manage data access efficiently.
Fetch all account records at once in the Apex controller and use client-side JavaScript to filter the results based on user input.
Use a Visualforce page instead of a Lightning component to leverage server-side rendering for better performance with large datasets.
Create a custom REST API endpoint to retrieve account records and call this endpoint from the Lightning component using the Fetch API.

Preparing for SalesForce Certified B2B Commerce Developer Certified B2B Commerce Developer? Now land the interview.

73% of qualified candidates get rejected because of weak resumes. Build an ATS-optimized, recruiter-ready resume in under 5 minutes - free to start.

Build My Resume Free