-
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
Top Salesforce Features for Developers to Try Out in 2022
With Spring ‘22 release, there’s a lot that’s new for Salesforce developers that they can look forward to. The release has come up with some…
4 Ways to Achieve Heroku-Salesforce Integration
Heroku provides a cloud application platform to create, run, and work with your cloud-based application. Heroku supports several programming languages like JAVA, Python, and PHP.…
Salesforce Predictions 2020: What does the Future Hold for Salesforce?
Salesforce, the market leader in CRM, has created a storm in the world of sales and marketing of products and services catering to a diverse…
Popular Salesforce Videos
How to Find Queries that Target a Data Extension in Salesforce Marketing Cloud
In this video, Cameron Robert shows how to find SQL queries in Automations that affect a specified Data Extension in Salesforce Marketing Cloud. Key Moments:…
Connecting to Salesforce in Outlook
Bring together the two platforms you use everyday: Salesforce and Microsoft Outlook. View and work with Salesforce data directly in your Outlook inbox, create Salesforce…
About Queueable Apex | Asynchronous Apex in Salesforce | Learn Salesforce Development
Queueable apex is an asynchronous apex method. It's similar to the @future method. By using this queueable interface, we can process an Apex that runs…
Popular Salesforce Infographics
The Working Of Salesforce CRM
Salesforce CRM is considered as the #1 CRM in the market. It has the ability to manage customer interactions of an organization through several methods.…
The Ultimate Marketing Automation Glossary
Sometimes, it sounds like marketers are speaking another language—especially when using terms associated with specific tools and platforms. It gets even more complicated when certain…
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…