Questions tagged [toast]

A Salesforce UI Event supported in the Lightning Experience and Salesforce1 only. Is used to notify a lightning component of the type of Event that has occurred which can be error, warning, success, or info. It allows the component to display a message when the event occurs.

2
votes
1answer
72 views

How can I test the click of a button that calls an Apex method, and makes the component show a toast?

The component itself, when loaded, queries some data from the database. Then, depending on what it finds, loads the specific template. One of those has a button, which will call the server again, and ...
0
votes
1answer
36 views

handleErrors toast Function not able to find

I want to toast the exception message when the callback is not succssful. as per the guidelines here:- https://developer.salesforce.com/blogs/2017/09/error-handling-best-practices-lightning-apex.html ...
0
votes
1answer
101 views

how to hide toast

We are using a backgroundutilityitem component, where we fire a toast event - https://developer.salesforce.com/docs/component-library/bundle/force:showToast/documentation I know it shows the toast, ...
0
votes
1answer
77 views

Show pop-up or toast or banner in Lightning Service cloud console

We are using omni channel. Goal is to enhance the experience of an incoming call. We want some sort of toast to appear inside console when an agent receives incoming call. So far this is what i have ...
6
votes
1answer
575 views

How to show hyperlink in LWC toast

I have created a LWC that executes a call to the controller and shows a toast message if the call fails: const event = new ShowToastEvent({ title: "Error", ...
0
votes
1answer
93 views

If I run a Component from App then Event like showToast,closeQuickAction,navigateToURL are not working [duplicate]

I am calling Component from App, in that case the Events like showToast,closeQuickAction,navigateToURL are not working. Please find and let me know how can I resolve this Test.app <aura:...
1
vote
1answer
571 views

Lightning toast message is not working in classic

I have created a lighting component and used it in a visualforce page by using lighting out. Is there any way to display the toast message?
0
votes
1answer
238 views

ToastEvent is not working and it's throwing error message [duplicate]

when i clicked on button after saving record it is showing error message that component need to refresh it. i have already refresh it even cookie cache and history also deleted but not showing success ...
0
votes
2answers
3k views

lightning component:toast alert message

hi guys does anyone know how to change my alert message into toast alert message.. please help here my code action.setCallback(this,function(a){ //get the response state var state = a....
0
votes
1answer
2k views

Toast mesage alert for visualforce page

Any help on how to create an toast message alert on my visualforce page <apex:page controller="MycustomSettingController" lightningStyleSheets="true" > <apex:slds /> <div class="slds-...
0
votes
1answer
333 views

How to auto close the toast message only on incoming of new toast message? [closed]

To close the toast message, only when new toast is fired or else it should stick to old toast message.
0
votes
1answer
2k views

Display toast message with buttons in a Lightning Component

Has anyone displayed a toast message with buttons in a Lightning Component? I need to add 'OK' and 'Cancel' buttons to the toast message. This is my code for the toast message: var resultsToast = $...
4
votes
2answers
171 views

How to present JSON via a e.force:showToast event - escaping of curly brackets?

I have been wondering why a string of this form ERROR on search state=ERROR error=[{"message":"System.QueryException: sObject type..."}] displays like this: ERROR on search state=ERROR error=[] ...
0
votes
1answer
908 views

print error message returned by a class in toast [closed]

I have a lightning component which is calling another apex class which in turn is calling anotehr apex class by creating its object. The first class is already returning a value. However, I would ...
3
votes
0answers
571 views

How to create a timed fade out message using force:showToast

So this is pretty simple to create. I have the code: showMessage : function(){ var toastEvent = $A.get("e.force:showToast"); toastEvent.setParams({ mode : "dismissable", ...
1
vote
0answers
58 views

How to avoid scroll to last focused element on Toast close

I'm using a Toast for showing whether a search has successfully completed or not when clicking the "Search" button. My problem is that, when it shows the list of results and I'm scrolling along it, ...
10
votes
4answers
6k views

How to show lightning toast on top of modal (quick action)?

I have created lightning quick action to add my component for some functionality. so from my quick action. When I do some validation like var opp = component.get("v.objOpportunity"); if(!...
2
votes
1answer
2k views

How to add listener for toast notifications?

I want to perform an action when a notification happens in my app. The toast event is raised by SFDC which means I do not have access to the calling code. I have tried adding a handler to the force:...
4
votes
1answer
760 views

Any way to detect that “e.force:showToast” will not be presented?

In the Developer Console Preview the "e.force:showToast" event is available but when fired does not produce any output. (Putting the same components in an App Builder app does produce output.) Is ...
-1
votes
1answer
69 views

How to refocus the Input-Field once the Toast is displayed [closed]

I have an InputField, when the length of the String entered in the InputField becomes 0, it should display a toast and on closing the Toast, the Focus should come back to InputField? Here I am able ...
1
vote
1answer
602 views

force:showToast own implementation

I read a lot of toast in lightning but in standalone app it's not working. In this guide https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_one.htm ...} else { //...
4
votes
1answer
3k views

Show lightning toast message in multiple lines

I have a lightning component which I am using for quickaction and I currently show an error message which is passed from the controller as a String. The problem is, I want to show the error message in ...
1
vote
1answer
275 views

Show multiple Toast messages in SF1 stacked

Is it possible to show multiple toast messages in SF1 stacked? When I fire more than one showToast event it displays one after another. But I want to display them all at once in a stacked layout.
8
votes
2answers
3k views

how to show a hyperlink in force:showToast message

How to show the message in hyperlink showToast : function(component, event, helper) { var toastEvent = $A.get("e.force:showToast"); toastEvent.setParams({ "title": "Success!", "message": "...
1
vote
1answer
1k views

Toast event in Lightning not working

Hello I am trying to make a Lightning component common to Community and SF1 . This component has been added as quick action on one of the object detail page. Now when i am using the toast event, it ...