A developer is asked to create a Visualforce page that lists the contacts owned by the current user. This component will be embedded in a Lightning page.
Without writing unnecessary code, which controller should be used for this purpose?
A developer is asked to create a Visualforce page that lists the contacts owned by the current user. This component will be embedded in a Lightning page.
Without writing unnecessary code, which controller should be used for this purpose?
To list the contacts owned by the current user on a Visualforce page embedded in a Lightning page, the Standard list controller should be utilized. This controller is designed specifically for handling collections of records and provides built-in functionalities to manage lists efficiently, making it an optimal choice for the given requirement.
Isn't it A?
A. Standard controller
I think its B, becuase we need filter contacts records by owner. If sharing settings to contacts are set to public - you`ll see all contacts of all owners
Since we need a list of records, standardListController is answer because we can extend the controller if the query need to be different. Also it comes with ready to use functions for list use case
https://trailhead.salesforce.com/ja/content/learn/modules/visualforce_fundamentals/visualforce_standard_list_controllers
C) Use the standard list controller and an iteration component, such as <apex:pageBlockTable>, to display a list of records. https://trailhead.salesforce.com/content/learn/modules/visualforce_fundamentals/visualforce_standard_list_controllers