Activity Forums Salesforce® Discussions What is the use of force:showToast in lightning components ?

  • Saddam

    Member
    October 3, 2019 at 6:06 pm

    Hi,

    A toast displays a message below the header at the top of a view. The message is specified by the messageattribute.

    force:showToast is not available on login pages.

    This example displays a toast message "Success! The record has been updated successfully."

    showToast : function(component, event, helper) {
    var toastEvent = $A.get("e.force:showToast");
    toastEvent.setParams({
    "title": "Success!",
    "message": "The record has been updated successfully."
    });
    toastEvent.fire();
    }

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos