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.

Filter by
Sorted by
Tagged with
0
votes
1answer
7k 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
643 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
5k 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 = $...
6
votes
2answers
342 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
2k 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 ...
5
votes
1answer
1k 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
1answer
336 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, ...
11
votes
5answers
13k 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(!...
3
votes
1answer
4k 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
2k 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
326 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 ...
4
votes
2answers
7k 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
505 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.
10
votes
2answers
6k 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
2k 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 ...

1
2