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
Jatin Sethi 26Jatin Sethi 26 

toast not working in salesforce 1 mobile app

I have created a lightning component. Now I am using it in my mobile app using action link. I am throwing aura enabled exception which are to be displayed in toast. It working fine for browser but it is not working for salesforce 1 mobile app. Suggest??
Khan AnasKhan Anas (Salesforce Developers) 
Hi Jatin, 

Greetings to you.

Currently, showToast is not working properly and Salesforce posted it as a known issue: https://success.salesforce.com/issues_view?id=a1p3A000000mCRqQAM&title=lightning-component-force-showtoast-displays-toast-message-behind-action-window-in-lightning-experience-and-salesforce1
 

In Salesforce1 the toast is blocked entirely by the action window making it appear as if the toast is not displaying at all.


There is no direct workaround when using the force:showToast event at this time as this is an issue with the DOM structure outside the reach of the custom component. But it is in a review and we may get a solution for this soon.

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Jatin Sethi 26Jatin Sethi 26
HI Anas,

it is working fine in lightning experience but not in salesforce1 app.why it is happening??
Khan AnasKhan Anas (Salesforce Developers) 
Hi Jatin,

That's what I told you that it is a known issue and currently it is not working in Salesforce1. According to Salesforce, Lightning Component force:showToast event displays toast message behind action window in Lightning Experience and Salesforce1

In Salesforce1 the toast is blocked entirely by the action window making it appear as if the toast is not displaying at all. In lightning experience also it is not working 100% correctly.

This issue is in a review and we may get a solution for this soon.

I hope it helps you.

Kindly mark this as solved if the information was helpful. It will help to keep this community clean.

Thanks and Regards,
Khan Anas