Activity › Forums › Salesforce® Discussions › What is the purpose of the controllers in Salesforce?
-
What is the purpose of the controllers in Salesforce?
Posted by Sumit kumar on April 2, 2020 at 12:20 PMWhat is the purpose of the controllers in Salesforce?
Deepak replied 6 years, 1 month ago 6 Members · 5 Replies -
5 Replies
-
Standard controllers fetches data and provide to the views such as page, list, dialog or forms. Controlling data for a single record: One of the key functionality of standard controllers is to provide the data, and to facilitate binding a view’s controls to the records fields for either display or input.
- [adinserter block='9']
-
Hii Sumit,
Standard controllers fetches data and provide to the views such as page, list, dialog or forms. Controlling data for a single record: One of the key functionality of standard controllers is to provide the data, and to facilitate binding a view’s controls to the records fields for either display or input. -
Standard controllers fetches data and provide to the views such as page, list, dialog or forms. Controlling data for a single record.
-
Hi Sumit,
It depends on your purpose:- If you want a page with many records, using standard list view, and list actions you could use standard list controller:
<apex:page standardController=”Account” recordsetVar=”accountsList”…> … </apex:page>
- If you want to use completely custom functionality and don’t really need most of the standard object behaviors, custom controller is a good option, but bear in mind, any standard actions you want to use will have to be implemented in your custom class. A page with a custom controller would use the following attribute:
<apex:page controller=”MyApexClass”…> … </apex:page>
Log In to reply.