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
1
vote
0answers
23 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 ...
0
votes
0answers
30 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
1answer
64 views

How to open VF page in separate tab or popup window from Aura Component

I have created a VF page which display tooltip information and I want to display those tooltip in separate window or separate popup window during record creation. I have referred below link to open VF ...
0
votes
0answers
65 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
1answer
341 views

toast message not appearing when triggered from flow

I have a lightning flow embedded in the case record page where I collect some dummy data from input screen and fire the toast message from Flow . I have created the aura component and called the aura ...
0
votes
1answer
181 views

Display Toast Message only once after login on Home Page

Is it possible to display toast message notification only once when user login to system on a home page? I don't want toast message appear every time if I navigate to home page multiple time? Wanted ...
1
vote
0answers
131 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
1answer
80 views

Error in $A.getCallback() [Cannot read property 'setParams' of undefined] Callback failed When Dismissing Alert Message

I created and displayed a custom list button in standard Lead list view. This references a Visualforce page. Clicking this button makes an action, and there's nothing wrong with the results in the ...
0
votes
0answers
31 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 ...
1
vote
1answer
180 views

Standard lwc lightning/platformShowToastEvent module and force:showToast aura event don't work in Lightning Community

We have community with Registration Page replaced with custom Lightning Community Page. The page is build with Aura component, which is using lwc components. Trying firing force:showToast from aura ...
0
votes
1answer
964 views

How to display toast or custom error message with in quick action

Currently, I'm working on lightning migration & i have a custom javascript button named convert. This button will display multiple toast messages based on record criteria. Everything working as ...
1
vote
1answer
164 views

How to show the date variable in the toast message in LWC

Hi how can show the value of the field in the LWC toast message which contains the date. I am trying to show but getting the value as undefined. JS code: @track MDate ===2020-07-15 @track StDate === ...
1
vote
4answers
1k views

Validation rule Error message not displaying in LWC UpdateRecord toast event

I have a record which I'm updating via the UpdateRecord method from LWC, using Toast events to display success or error messages, which all works fine. What I'm not getting though, when there's a ...
0
votes
1answer
395 views

Display Link of Inserted Record Id in Toast in Salesforce LWC [duplicate]

I have a page which displays a toast message upon successfully inserting a custom object record. I think it would be appropriate to add the record id, so when I click on it, it will redirect to the ...
0
votes
0answers
124 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
256 views

How to set the width of Toast message box in lightning component

I have a requirement where field value from long text field called Alert_Text_Timeline__c will be displayed as toast message on click of a button. Below is my code Component: <aura:component ...
0
votes
2answers
741 views

How to display Toast message with custom field value as its message

I have a requirement to display message toast on detail page when any record is opened. This message will be from a custom field (Alert_Text__c) on Account which is a text field. Below is the code to ...
0
votes
1answer
50 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
17 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 ...
2
votes
2answers
964 views

How can I show a LWC ToastEvent message in Visualforce?

I have an LWC component which has multiple showToastEvents which works in Lightning Exp without any issue. But when I am calling the same LWC component from a VF page, I am not able to see toastevent....
0
votes
1answer
116 views

In Aura Component,Can I Call a local method in toast?

a.cmp <aura:component > //... <lightning:button label="looks" onclick="{!c.initDialog}" /> //... </aura:component> controller.js initDialog: function (component, ...
1
vote
1answer
1k views

LWC: How to Use Wire Method and ShowToast correctly

So I've got a project that uses a screen flow to update opportunities with a related payment record. Once the record is linked to the opp, I have a lightning component that displays summary data of ...
1
vote
1answer
377 views

Toast is not firing from the lightning component

I am trying to show the toast on the screen after the field is updated using the lightning component the Controller looks like below Controller ({ recordLoaded: function(component, event, helper)...
0
votes
1answer
202 views

showToast from messageCallback function of empApi

I have an empApi subscription to a Platform Event. When that event fires, I want to pull data from its fields and showToast. I'm copying the code straight from the docs, and I can get the platform ...
1
vote
1answer
464 views

lightning Toast message in LWC in Visual force page is not working

lightning Toast message is not showing when i click on save button. Is that anything wrong in the below code. Please help me on this. <div class="slds-size_2-of-2"> <lightning-button type="...
1
vote
0answers
132 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
1answer
543 views

LWC: Slide an element in and out

I'm building a Lightning Web Component for a standalone Aura app where ShowToastEvent isn't available. I've seen an example of a custom LWC toast component that shows and hides itself using slds-show ...
1
vote
4answers
300 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
0answers
168 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
1answer
95 views

How to fire appEvent after toastEvent in lightning controller

I have an appEvent on a child controller to update a parent method after a toast. I have set an alert on the parent in the parent method to figure out if my event is working properly. My alert shows ...
1
vote
3answers
1k views

Call toast notification in LWC from within fetch method

EDIT: I originally left out a part of my code which I thought was irrelevant to the question but on further investigation realized it was the source of the issue. Adding it in and then will also add ...
0
votes
0answers
314 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("...
2
votes
2answers
1k views

How to show toast message in multiple lines in a Lightning Web Component

I have a requirement where I need to display my toast message in multiple lines in my LWC. I tried using \n and but they are not working. Please assist.
0
votes
1answer
238 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 ...
5
votes
1answer
325 views

pester mode not working for showToastEvent in LWC

I have a Lightning web component (LWC) using showToastEvent. The pester mode is not working right -- I do not see a close icon and it closes automatically in 3 seconds. This answer says to clear the ...
0
votes
1answer
273 views

Lightning component error when adding toast to the community

I am just trying to add simple toast component on community page based on picklist value of type field. But I am getting callback error. I am not able to resolve this error. Any help is much ...
0
votes
2answers
2k views

Display Exception message in toast when calling Apex using @wire

I love @wire(ing) LWC properties like import { LightningElement, wire } from "lwc"; import getAccounts from "@salesforce/apex/MyCtrl.getAccounts"; export default class MyComponent extends ...
0
votes
2answers
3k views

How to call toast in apex class?

I have a Apex Trigger on creation of a record that calls an Apex class. The point of a method in the class is to check the current time of user and see if it is within business hours. However, I want ...
1
vote
2answers
6k views

ShowToastEvent notification is not displayed in LWC

I have a problem with Toast Event in Lightning Out App. I don't know why when I click on button "Show notification" - nothing happens. I want to see notification, but it's not showing. HTML file: &...
2
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 ...
0
votes
1answer
121 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
808 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
746 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 ...
8
votes
2answers
4k 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", ...
1
vote
1answer
2k 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
928 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
13k 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
6k 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
593 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 = $...