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
Sandeep TechAffinitySandeep TechAffinity 

How to Show Toast Message every time we get a API response ?

Hi Guys,

We have a Webservices which call every day but the time is not guaranteed, Now I want to show a toast message whenever got a response. Please help me with the code.

Thank You
Sandeep

 
SwethaSwetha (Salesforce Developers) 
HI Sandeep,
You can tweak this code from https://salesforce.stackexchange.com/questions/361186/how-can-i-show-the-api-response-in-my-component-with-toast according to your requirement.

Related: https://salesforce.stackexchange.com/questions/279199/call-toast-notification-in-lwc-from-within-fetch-method

If this information helps, please mark the answer as best. Thank you