Activity Forums Salesforce® Discussions How to show Toast message in Preview of Lightning Application in Salesforce?

  • How to show Toast message in Preview of Lightning Application in Salesforce?

    Posted by krati on February 6, 2020 at 12:42 pm

    I am using:

    showToast : function(component, event) {
            var toastEvent = $A.get("e.force:showToast");
            toastEvent.setParams({
                message:'This account does not have any contacts.',
            });
            toastEvent.fire();
        }

    but this gives me an error. How can I use this in preview?

    krati replied 4 years, 2 months ago 1 Member · 0 Replies
  • 0 Replies

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Popular Salesforce Infographics