Activity Forums Salesforce® Discussions what is the functionality of “.setCallback()” method in Salesforce Lightning ?

  • what is the functionality of “.setCallback()” method in Salesforce Lightning ?

    Posted by Arun on February 12, 2020 at 11:30 am

    what is the functionality of “.setCallback()” method in Salesforce Lightning ?

    Anjali replied 4 years, 2 months ago 3 Members · 2 Replies
  • 2 Replies
  • Shweta

    Member
    February 12, 2020 at 2:19 pm

    setCallback()  Method : It is used to provide a callback function when making a call to a server-side controller.

  • Anjali

    Member
    February 12, 2020 at 2:23 pm

    setCallback (Object scope,function callback,String name)

    Sets the callback function that is executed after the server-side action returns. Call a server-side action from a client-side controller using callback.

    Parameters
    scope : Object The scope in which the function is executed. You almost always want to set scope to the keyword this.
    callback : function The callback function to run when the server-side action completes.
    name : String The action state that the callback is associated with.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos