function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

toast messages not displaying When embedding a lightning component inside a lightning app

Toast message works when i work from standalone LEX component, however when i save the record from the lightningApp the toast messages are not getting fire.

I know there is a limitation since we can not fire toast events from classic and app, 

I am looking out for an workaround here. Appreciate your help

Below is my controller.
onSave : function (component, event, helper) {
        helper.saveRec(component, event, helper);
Helper :
saveRec:function(component, event, helper) {
        var gbmObj= component.get("v.newGBMPlan");
        var action = component.get("c.creatGBMRecord");
                "gbm": gbmObj ,
                "gbm": gbmObj ,
            if (response.getState() === "SUCCESS") {
                //alert("Record Created/Updated Successfully");
               // var toastEvent = $A.get("e.force:showToast");
                    title: "Record Created/Updated Successfully",
                    message: " ",
                    type: "success"

Lightning App
<aura:application extends="force:slds" access="GLOBAL" >
    <aura:dependency resource="markup://force:showToast" type="EVENT"></aura:dependency>

Annu ChoudharyAnnu Choudhary
Hi Rbn,
Toast event in a lightning component not run in standalone-app (Lightning App). please this component to a or any record page and then run its work properly.
Please select the best answer if it works for you.