-
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
How Salesforce Boosted the Reach of MrBeast’s $1M Puzzle
Salesforce partnered with YouTuber MrBeast for a groundbreaking Super Bowl campaign that turned a traditional ad into an interactive $1 million puzzle hunt, massively amplifying…
Avoiding Common Hiring Mistakes When Recruiting Salesforce Developers
In today's rapidly evolving digital landscape, Salesforce has emerged as a powerhouse CRM platform. It enables businesses to manage customer relationships efficiently and drive growth.…
Salesforce Experience Cloud – Possibilities, Cost, and Facts
Thinking about building a portal for your own customers or dealers? Here’s the inside scoop on some important facts you should understand and know about…
Popular Salesforce Videos
Salesforce: Everything You Need to Know About Order Management
THE GOAL: Which Salesforce Order Management application is best? Well, that depends…. Salesforce offers three primary applications for order management, and they all work extremely…
Difference between Profile and Roles in Salesforce
Learn about the difference between Profile and Roles? Watch this video and do let us know if you have any questions or concerns.
Event & Task List - Salesforce Classic vs Salesforce Lightning
Event & Task List - Salesforce Classic vs Salesforce Lightning Video demonstrated the Event & Task List Salesforce Event List in Salesforce Classic Task List…
Popular Salesforce Infographics
Salesforce Admin Certification Path
This infographic helps you to understand the complete certification path to become Salesforce Administrator which includes accreditation body, pre-requisites, eligibility criteria, examination format and career…
Enhance Customer Experience With Salesforce
Salesforce Makes Personalized, Consistent Digital Customer Experience a Reality. Salesforce, widely recognized as the leader in business CRM, gives organizations the tools they need to…
Top Salesforce Acquisitions Of All Time and In 2020
Salesforce has been on a shopping spree over the last few years. We all read quite frequently about Salesforce acquisitions. They are quick enough to…