Activity Forums Salesforce® Discussions Why do we use extensions while creating the Salesforce Visualforce Page?

  • chanchal kumar

    Member
    August 9, 2018 at 9:29 am

    A controller extension is an Apex class that extends the functionality of a standard or custom controller. Use controller extensions when:

    • You want to leverage the built-in functionality of a standard controller but override one or more actions, such as edit, view, save, or delete.
    • You want to add new actions.
    • You want to build a Visualforce page that respects user permissions. Although a controller extension class executes in system mode, if a controller extension extends a standard controller, the logic from the standard controller does not execute in system mode. Instead, it executes in user mode, in which permissions, field-level security, and sharing rules of the current user apply.

    It is not compulsory to use extension in every vf page.

  • Parul

    Member
    September 12, 2018 at 5:07 am

    Hi

    A controller extension is an Apex class that extends the functionality of a standard or custom controller. Use controller extensions when:You want to leverage the built-in functionality of a standard controller but override one or more actions, such as edit, view, save, or delete.

     

    Thanks

  • shariq

    Member
    September 15, 2018 at 1:45 pm

    Hi,

    Basically to override the standard functionality or to add some new functionality.

    Hope this helps.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos