Categories
Appunti

Create Toast Message

To create a toast message in case of error or success

getToast:function(component, event, helper, title, message, type){
        var toastEvent = $A.get("e.force:showToast");
toastEvent.setParams({
            title : title,
            message: message,
            type: type,
        });
        toastEvent.fire();
     },

How receive from apex code the error by catching?

View this link https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/controllers_server_apex_custom_errors.htm

Leave a Reply