-
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
Accelerate Quote to Cash with DemandBlue’s Revenue Cloud Accelerator Program
Organizations that need to enhance their quote-to-cash process and accelerate revenue growth consider Salesforce Revenue Cloud the best-fit solution due to its boundless capabilities and…
Building an Azure DevOps Pipeline for Salesforce Scratch Org Automation: A Journey to Success
It's exciting to solve a challenging problem. I recently went through such a journey when tasked with automating Salesforce Scratch Org Automation workflows through Azure…
Salesforce Email Studio - Everything That You Need to Know
Email marketing is one of the most effective forms of marketing in the digital age. By using powerful email marketing tools, you can target and…
Popular Salesforce Videos
The Salesforce & Deloitte Partnership in APAC
The Salesforce & Deloitte Partnership in APAC: Discover how Deloitte Digital stayed resilient during times of change. Find out how the Deloitte Digital team armed…
How to Choose Salesforce Career Path | How To Start a Salesforce Career
With most of the businesses using Salesforce finding access to talent to be a ‘critical challenge’, it’s no wonder so many people are choosing a…
3 Easy to Use Salesforce Field Service Dashboards | AblyPro- Live Webinar
Watch AblyPro's exciting webinar video on Salesforce Field Service Reports & Dashboards. Discover how these powerful tools can drive efficiency and cut support costs for…
Popular Salesforce Infographics
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…
What are Salesforce Lightning Web Components?
Lightning Web Components ( LWCs ) are User Interface (UI) framework and utilized for creating applications with desktop and mobile technologies. This framework acts as…
See Why Salesforce Goes All In on Pro Bono
Salesforce Pro Bono Program aims to match nonprofits and higher education institutions with Salesforce professionals to maximize their Salesforce implementation and transform their organization. Scroll…