Activity Forums Salesforce® Discussions When do we use custom controller in Salesforce with extension class?

  • Yogesh

    Member
    August 9, 2019 at 2:53 pm

    Well I was able to find the below two reasons to use Extensions. In fact Controllers & Extensions are for same purpose which I understood.
    1. Suppose there exists a VF page which has a custom controller called on it, and it is well tested and currently in use by the end users, if you want to add additional functionality on this VF page, you better don't disturb the existing program which would hit your business big time in case if anything goes wrong, rather write an extension and use it on VF Page.

    2. We can't call multiple custom controllers on a VF Page, but we can call second controller while we have the first controller on VF page, and however you need to define your second controller as Extension rather as controller.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos