Activity Forums Salesforce® Discussions What is the Action attribute of apex:page for initialization in Salesforce? Reply To: What is the Action attribute of apex:page for initialization in Salesforce?

  • Manpreet

    Member
    April 26, 2018 at 4:28 pm

    Hi saurabh,

    The reason that we don't suggest doing initialization there is because we don't promise that your controller methods will fire in any particular order, other than that your constructor will be called first.If you want to do initialization you should do it in the constructor of your controller, since that will happen when the instance of the class is created. The action attribute is really only useful for redirecting, specifically conditional redirecting.

    Thanks.