Activity Forums Salesforce® Discussions What is the use of $A.enqueueAction(action) in Salesforce?

  • What is the use of $A.enqueueAction(action) in Salesforce?

    Posted by Shweta on May 29, 2020 at 3:40 PM

    What is the use of $A.enqueueAction(action) and how to call server-side action from the client-side?

    Aditya replied 5 years, 12 months ago 3 Members · 2 Replies
  • 2 Replies
  • MOHIT

    Member
    June 1, 2020 at 3:37 PM

    It adds the server-side controller action to the queue of actions to be executed. 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

  • [adinserter block='9']
  • Aditya

    Member
    June 1, 2020 at 5:15 PM

    Hi,
    $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

Log In to reply.