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
Ridhima Saxena 21Ridhima Saxena 21 

Custom Code to use globally as showToast message used in lightning Component?

Hii Developers,
I wanted to ask if there is any way to replicate same functionality of showToast which is used in lightning component.

I have lightning component which I have put inside visual force page to use in classic 

So after submit data successfully I wanted to show showToast message similar looking piece of code which works like toast message on classic and placed globally outside the component just we see in lightning 

User-added imageJust like here you can see show toast globally

I wanted this same functionality for classic

If anyone could help would be a great help

Thanks in advance

AnudeepAnudeep (Salesforce Developers) 
Hi Ridhima, 

As far as I know, it is not supported in classic

You could use this post as a reference

e.force:showToast event is handled by the one.app container. It’s supported in Lightning Experience, Salesforce app, and Lightning communities.

Guess you have to manually implement toast using SLDS

Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you