Activity Forums Salesforce® Discussions Why do we use doInit function in the Salesforce Controller Class?

  • Deepak

    Member
    January 29, 2020 at 1:23 pm

    Hi Manish,

    We use doInit function in controller class when the component calls i.e. it is initialized.

    Hope it helps!

  • Marziya

    Member
    January 29, 2020 at 2:27 pm

    Hii Manish,

    init is a predefined event sent to every component. After the component is initialized, the doInit action is called in the component's controller. In this sample, and thecontroller action sets an attribute value, but it could do something more interesting, such as firing an event.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos