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.

14 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 ...
3
votes
1answer
3k 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
32 views

How can we override standard Salesforce Lightning message?

We have custom logic to assign opportunity owner, when the User manually try to change the owner Apex code kicks in and assign the owner according to the logic. Still Lightning Users are getting the ...
1
vote
0answers
192 views

Close Toast Message with messageData on hyperlink click - lwc

I have a toast message in lwc that uses sticky mode (does not go away until the user click on close symbol) and also messageData (to add a hyperlink in the toast for the user to click on). The thing ...
1
vote
0answers
152 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
320 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 ...
0
votes
1answer
39 views

How to solve the problem of Uncaught Typescript Error?

I'm new in LWC and especially in JS... Have a problem with toasting message in upload file custom component. part of code.js const {base64, filename, recordId} = this.fileData ...
0
votes
0answers
34 views

Weird Context Behaviour in LWC and Apex

I'm writing a simple 'Merge Lead and Opp' lwc that leverages apex to transfer some custom fields from the lead to the opp before deleting the lead. The apex works fine. The issue is that when the apex ...
0
votes
0answers
93 views

Toast Message in Flow not Showing When called from listview button

I have followed steps explained in this thread: toast message not appearing when triggered from flow Copied the exact code of the component line by line, yet when I tried calling it from my flow, it ...
0
votes
0answers
39 views

Popup to be displayed on uploading duplicate file in the Notes and Attachment under Account Object

I have a requirement where I need to warn the user if they are uploading duplicate files against a particular Account record. The file will be uploaded, only need to show them a Warning message. I ...
0
votes
1answer
64 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
177 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
350 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
267 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 ...