Activity Forums Salesforce® Discussions What is the purpose of enqueueAction in helper.js in lightning in Salesforce?

  • Anjali

    Member
    January 29, 2020 at 2:07 pm

    $A.enqueueAction(action) adds the server-side controller action to the queue of actions to be executed. All actions that are enqueued will run at the end of the event loop. Rather than sending a separate request for each individual action, the framework processes the event chain and batches the actions in the queue into one request. The actions are asynchronous and have callbacks.

  • Marziya

    Member
    January 29, 2020 at 2:09 pm

    Hii Deepak,

    $A.enqueueAction(action) sends the request the server. More precisely, it adds the call to the queue of asynchronous server calls. That queue is an optimization feature of Lightning.

     

  • krati

    Member
    January 29, 2020 at 2:09 pm

    $A.enqueueAction(action) sends the request to the server. It adds the call to the queue of asynchronous server calls.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos