Activity Forums Salesforce® Discussions What is the purpose of the controllers in Salesforce?

  • Anjali

    Member
    April 2, 2020 at 1:08 pm

    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.

  • Manish

    Member
    April 2, 2020 at 1:35 pm

    Controllers are used process apex class and VF Page.

  • Marziya

    Member
    April 2, 2020 at 2:22 pm

    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.

  • Pooja

    Member
    April 2, 2020 at 3:58 pm

    Standard controllers fetches data and provide to the views such as page, list, dialog or forms. Controlling data for a single record.

  • Deepak

    Member
    April 2, 2020 at 5:08 pm

    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.

Popular Salesforce Blogs