-
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

HIPAA Compliant Salesforce Health Cloud – Why Healthcare Organizations Must Consider It
In this fast-paced world, healthcare consumers want their personalized information at a great speed. 71% of millennials want doctors to provide mobile applications for actively…

Salesforce Email and Events Integration Options
In the ever-evolving digital business landscape, a robust CRM platform like Salesforce becomes even more powerful when it can seamlessly integrate with your organization's email…

Salesforce Implementation Checklist: 9 Steps to Success
Through it all, Salesforce continues to remain one of the largest players and one of the best platforms in the market. But we all know…
Popular Salesforce Videos
What are lookup filters in Salesforce?
In this video, we will leaarn about Lookup Filters in Salesforce by dividing this topic into 4 basic points, which are: 1. What is a…
9 Stages of Identity & Access Management Lifecycle | Salesforce Tutorial
Grow your architect skills and expertise in the area of Identity and Access Management. This video explains the 9 stages of Identity & Access Management…
Stephen Merity - Really Quick Questions with a Salesforce Researcher
Stephen Merity is a senior research scientist working on deep learning in San Francisco with Salesforce Research via the MetaMind acquisition. He's been lucky enough…
Popular Salesforce Infographics

Success With Salesforce For Full Cycle Reps
I am presenting this infographic to help full cycle sales reps get the most out of salesforce and their Sales Engagement platform.

Salesforce: A Powering Business Of All Sizes
Salesforce is a cloud-based software that helps businesses track and manage their interactions with customers and potential customers. More than 150,000 companies worldwide use Salesforce.…

Customer Service: The Forgotten Marketing Channel
The key to good customer service is building good relationships with your customers. Thanking the customer and promoting a positive, helpful and friendly environment will…