Activity Forums Salesforce® Discussions In What Order Do Methods Fire Within A Salesforce Controller?

  • Avnish Yadav

    Member
    July 30, 2018 at 4:13 am

    Hello Chanchal,

    If you are asking the order of execution of setter and getter values then Setter is fired first, a then getter fires.

    A setter is called before the action methods, the action method executes will be accessing the variable that was set.

    Thanks.

  • madhulika shah

    Member
    September 19, 2018 at 1:10 pm

    Hi,

    The constructor is called when a page using the controller is first viewed (unless you've just come from another page that uses the same controller).

    Getters are called as the page is rendered to fill in information, then actions are typically fired after in response to a button press or similar. <apex:actionPoller> renderes every n seconds where you define the time, and if it re-renders part of the page (or the whole page) the getters would be called after the action is performed.

    Thanks.

  • Parul

    Member
    September 22, 2018 at 1:33 pm

    The constructor is fired after that the order is in the order that the methods are called by the page. Setters methods are called before action methods, but there is no guarantee of the precise order.

     

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos