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 3 years, 11 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

  • 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.

Popular Salesforce Blogs

Popular Salesforce Videos