-
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
Automation Hero | Salesforce Process Builder a step ahead Workflow
Every day at our workplace, we spend a considerable amount of time doing routine work processes that mostly repetitive and do not require any special…
How Can We Add Global Actions to Salesforce1?
Hello guys, Today we see that how we can add global action in Salesforce1. But first, let’s see brief definition of that what is global…
Introduction to Apex Unit Tests | The Developer Guide
In this blog, we will study test classes in apex, the best practices of test classes, and how to implement them. So, let’s begin with…
Popular Salesforce Videos
When Salesforce is Down/Offline - Keep on Going With Zoho
Wtahc this video and learn how to keep your organization moving when Salesforce is DOWN or OFFLINE. Do let us know if you have any…
How to Subscribe Salesforce Report in Lightning Experience?
Subscribe Report : We can configure any Salesforce report to run Daily, Weekly or Monthly as HTML email to your Salesforce org. users. Advantages of…
Salesforce — How To Market Your Small Business
How can small businesses get the word out about what they do, and be strategic about it? Here are three important steps to consider when…
Popular Salesforce Infographics
9 Steps for Building a Useful Price Quote Template
Price quotes are among the most fundamental components of a sales unit’s library, yet too many sales managers treat quotes as a perfunctory measure that…
Choosing the Right Salesforce Partner - Guide
Tips To Hire The Right Salesforce Partner for Growth & Success Salesforce is compact with some of the most exemplary features like no other CRM…
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…