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.

11 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
1k 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 ...
2
votes
1answer
1k 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 ...
1
vote
0answers
56 views

Catching and relaying show toast event

We want to use Lightning toasts from Lightning Out. We want to do this using the standard new ShowToastEvent approach, so our components will work identically either in Lightning Experience or ...
1
vote
4answers
204 views

LWC: Show Toast from Service component

I need to show toast from LWC service component, but I don't have and won't have any instance of LWC component. That means no class which extends LightningElement. This service will be used in Aura ...
1
vote
1answer
179 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, ...
0
votes
0answers
37 views

Error message need to display on custom Toast message

In Javascript i am catching the error and displaying it on console.log succesfully, but how can i save this error message in a variable and use it in my custom toast message ? Code in JS : Where i am ...
0
votes
1answer
32 views

Lightning Toast moving screen to top of page

I have a normal toast event on a lightning component that is halfway down a page that consists of several lightning components. When the toast event fires, the toast appears and once it is closed the ...
0
votes
0answers
14 views

Component not getting refreshed until user clicks somewhere in Lightning Component

I have aura-if sections in my lightning component which shows a pop-up if user click on edit for any record which is working fine. In pop-up, I have a button on click of which it does some processing ...
0
votes
0answers
112 views

toast message with “undo” button

I need recreate the toast message in standard components with the "undo" button that appears when you delete a record. Is that possible in a custom component? for example: var actions = component.get(...
0
votes
0answers
171 views

toast error message showing up two times

based on a field value as null on account I'm showing up a toast error message as below: if(field == null) { console.log('comin inside field null') var resultsToast = $A.get("...
0
votes
1answer
134 views

lightning-record-form onError jest test

I'm looking at writing a jest test for the lightning-record-form to test the error handling, The full function should be onError display a Toast event stating the error message to the user const ...