Activity Forums Salesforce® Discussions What is the need of “Custom Controller” in Visualforce as everything can be done by the combination of Standard Controller + Extension class in salesforce?

  • What is the need of “Custom Controller” in Visualforce as everything can be done by the combination of Standard Controller + Extension class in salesforce?

    Posted by Saurabh on April 24, 2017 at 10:00 am

    What is the need of “Custom Controller” in Visualforce as everything can be done by the combination of Standard Controller + Extension class in salesforce?

    Parul replied 6 years, 3 months ago 3 Members · 2 Replies
  • 2 Replies
  • Suraj

    Member
    April 24, 2017 at 12:48 pm

    Hi Saurabh,

    Sharing setting is applied on standard object/extension by default. In case we don’t want to apply sharing setting in our code then Custom controller is only option.
    It is possible that the functionality of page does not required any Standard object or may require more than one standard object, then in that case Custom controller is required.

  • Parul

    Member
    September 20, 2018 at 5:11 pm

    Hi

    1)      Sharing setting is applied on standard object or extension by default, In case we don’t want to apply sharing setting in our code then Custom controller is only option.

    2)      A custom controller is an Apex class that implements all of the logic for a page without leveraging a standard controller. Use custom controllers when you want your Visualforce page to run entirely in system mode, which does not enforce the permissions and field-level security of the current user.

     

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos