-
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
Salesforce CRM, NetSuite ERP Integration: Benefits, Guide, Best Practices
NetSuite is the #1 Cloud ERP. In 2022, NetSuite became a leader in the Gartner Magic Quadrant for Cloud ERP for Service-Centric Enterprise. As you…
What is Salesforce Web3 Tech and How Does it help in Creating Reliable, Long-Lasting Communities
With a unified platform and the help of Salesforce Web3, organizations can efficiently scale while creating linked consumer experiences across Web2 and Web3. Web3, referred…
Popular Salesforce Videos
Creating Massive Junction Records with LWC | Salesforce Lightning Tutorial
Don't miss this new interchange session with Jorge Ortega and Alba Rivas! They'll discuss how to build an LWC that allows you to easily create…
How to Use Customer 360 | Salesforce
See how Salesforce Customer 360, our entire portfolio of technology, unites your team with company data on one integrated CRM platform, delivering the personal experiences…
How to Set Up Salesforce Knowledge in Service Cloud
Help your customers and agents find answers they are searching for faster with Salesforce Lightning Knowledge. In this video, we will review: - All components…
Popular Salesforce Infographics
Future of Salesforce CPQ
Salesforce CPQ is a highly dependable tool that provides an accurate pricing strategy by configuring, pricing, and quoting the products of each company based on…
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…
What are the Top 5 Affordable Salesforce Integration Apps for SMBs?
Salesforce CRM is one of the core tools for any business looking to build B2B and B2C leads – and while the CRM itself is…