-
How to ShowToast duration parameter not working in Salesforce Lightning Web Component?
handleToast(){
if(this.showToast){
//console.log('calling case comments');
getCaseComment({caseId: this.recordId})
.then(result => {
if(result){
this.dispatchEvent(
showToast('Info','pester', 'Latest Case Comment', result, 75000)
);
}
})
.catch(error => {
console.log('Error occured in showing case comments'+error);
});
}
}/**
* showtoast event
* @param variant
* @param mode
* @param title
* @param message
* @returns {ShowToastEvent}
*/
const showToast = (variant = 'info', toastMode = 'dismissable', title, message, toastduration) => {
//console.log('dutaion receved >>'+toastduration);
const event = new ShowToastEvent({
title: title,
duration : toastduration,
message: message,
variant: variant,
mode : toastMode
});
return event;
}
Log In to reply.
Popular Salesforce Blogs
Basics of Salesforce Admin and App Builder Certifications
A Salesforce Admin Certification is the most elevated type of acknowledgement a Salesforce Administrator can accomplish; it shows aptitude in the field just as a…
Salesforce Einstein AI: Everything you need to know about AI for CRM
Introduction Have you ever wondered how YouTube knows exactly what video you want to watch? Or perhaps you’ve been humming a tune all day, only…
Introducing Salesforce Blockchain: World’s No.1 CRM Moves into Blockchain with its own Platform
Salesforce just got done with TrailheaDX 2019 this weekend. Algoworks was at TDX19 too, and oh boy, did we have fun! There was a bunch…
Popular Salesforce Videos
TrailheaDX 2020 - How Salesforce Plans To Make Virtual TDX2020 Better
For Salesforce, taking TrailheaDX digital is about more than just keeping the event going, the company wants to make TDX a better, more inclusive, and…
Salesforce For Beginners | Introduction To Salesforce | Salesforce CRM Development Tutorials
In this video, BeginIT provides an introduction to Salesforce, including its difference from legacy CRM systems. And also, BeginIT explains the procedure to create an…
What are Global Picklists and Field Dependency in Salesforce? | How to Create Global Picklists?
In this video, Shrey is not only teaching but also demonstrating to you "What are Global Picklists & Field Dependency in Salesforce?". You will be…
Popular Salesforce Infographics
How to Use Psychology to Target Your Buyer?
Ever wanted to get into the minds of your customers and figure out how they think? Ever wanted to know the best methods to convince…
How to Leverage A.I. Without Losing Your Humanity?
Artificial intelligence, or AI, is technology that learns, reasons, and self-corrects, and it’s being used by businesses to improve the customer journey. Automation, machine learning,…
See How Building Apps on Salesforce Has Tremendous ROI
The pressure that businesses today are under to reduce costs, improve agility, and deliver better results is no joke. Couple that with rapidly evolving technology…