Activity Forums Salesforce® Discussions What is the use of setAbortable() in lightning Component?

  • Piyush

    Member
    August 19, 2019 at 6:00 am

    A component is automatically destroyed and marked invalid by the framework when it is unrendered. Mark a server-side action as abortable by using the setAbortable() method on the Action object in JavaScript.

    An abortable action is sent to the server and executed normally unless the component that created the action is invalid before the action is sent to the server.

    example:-

    var action = cmp.get("c.serverEcho");
    action.setAbortable();

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos