-
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

Effortless Integration of Salesforce Org Documentation Into Atlassian Confluence
Are you tired of the manual and time-consuming process of documenting your Salesforce organization? Look no further than AbstraLinx, a revolutionary tool designed to streamline…

Permission Sets in Salesforce - Learn About Its Different Types
A permission set is a collection of settings and permissions that give users access to various tools and features. Permission sets extend users' functional access…
Popular Salesforce Videos
Sankey Diagram in Salesforce
A Sankey diagram is a visualization used to depict a flow from one set of values to another. The things being connected are called nodes…
How to Become a Certified Salesforce Admin
It is predicted there will be 1.9m new Salesforce job openings by 2020. Consultants thinking of a career in IT should consider training in cloud…
Popular Salesforce Infographics

Average Salesforce Salaries 2019
This Infographic gives Salesforce professionals an idea about where they sit in the market and what salary they can expect, using data from the Mason…

The Ultimate Dreamforce Parties 2019
Salesforce Dreamforce has it all. 2700+ sessions, workshops, hands-on demos, product launches, and whatnot. But everyone deserves breaks in between these gripping sessions, right? Dreamforce parties are a…

The Salesforce Lightning Platform for Employee Engagement: Key Findings
Salesforce provides a system of engagement across the entire employee lifecycle that enables organizations to connect multiple back-end systems of record with one system of…