Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
2answers
34 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
58 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
127 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
449 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
81 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
196 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 ...
2
votes
0answers
203 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", ...
0
votes
0answers
30 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, ...
5
votes
3answers
2k 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(!...
0
votes
0answers
34 views

Auto-hide <ape:outputpanel> with toast - alert

I have below VF code to display LDS toast alert based on the showSuccess values of the controller. How can i auto-hide this panel after say 3 seconds. I'm looking for a solution something like .delay(...
2
votes
1answer
760 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
408 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
38 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
456 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
2k 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 ...
0
votes
0answers
89 views

Toast is behind salesforce header

We have a toast on our org that works before summer 2017. However, it stopped working as intended when summer 2017 came. Upon looking at our codes, installed lightning cli, etc, there's really nothing ...
1
vote
1answer
215 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.
9
votes
2answers
2k 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 ...