-
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

Why Real Estate Businesses Are Turning to Salesforce Customer Portal For Improving Client Relations?
Real estate is dynamic, and like any other industry, it involves specific challenges like working with customers, processing enormous amounts of property-related information, and timely…

Types of Relationships in Salesforce - All You Need to Know
What is a Relationship? Connecting different objects with each other (to connect their records, afterwards), to replicate a real-life scenario/business process is called a relationship in…

Latest Salesforce Commerce Cloud Feature: Lightning Order Management to Enhance the Order Management Process
If you are in the process of managing end-to-end order management in e-commerce or a product company, you would agree that it is the most…
Popular Salesforce Videos
How to get a job in Salesforce industry or ecosystem? (For freshers) | 7 Step Guide
The most common question that is asked: How do I get a job? I have learned Salesforce and I know how to create applications on…
How to Get Your Data In and Get Insights Out | Salesforce Essentials
Organize all your data with Salesforce Essentials. With a quick and easy import, you’ll be able to manage your business and watch it grow. Essentials…
How Salesforce Industries can Help Organizations to Save Millions?
Salesforce Industries i.e Vlocity empowers businesses with powerful platforms to boost collaboration and makes it easy to deliver great customer experiences. It provides tailored solutions…
Popular Salesforce Infographics

Growth of Salesforce (Data and figures)
Salesforce.com is the #1 Customer Relationship Management (CRM) company in the world with regard to the market share. It provides numerous CRM software that helps…

Streamlining the Sales Process with Salesforce CPQ
Implementing Salesforce CPQ offers numerous business advantages, such as automating tasks, including sales quotations and price determination. Businesses that use Salesforce CPQ can expect increased…

How to Build Leads with Salesforce
Salesforce is a force to reckon with when it comes to inbound lead management. However, for certain businesses, especially smaller ones, the various add-ons and…