-
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
Installation and Configuration of MailChimp for Salesforce
Follow the below steps for installing and configuring MailChimp for Salesforce and use for Email Marketing: 1. Firstly, Signup for MailChimp by going on https://login.mailchimp.com/signup/…
Salesforce Commerce Cloud Implementation
Salesforce is a globally trusted and most popular cloud-based platform that offers a wide range of digital products to businesses to increase their potential, acquire…
Ensuring a Seamless Customer Experience with Option Constraints | Salesforce CPQ
Salesforce CPQ provides an advanced and effective solution for companies looking to streamline their sales process and improve the customer experience. One of its key…
Popular Salesforce Videos
Salesforce Developer Training Videos For Beginners | Salesforce Training Videos | Edureka
This Salesforce developer training video will give you an introduction to the development aspects of Salesforce. You will learn how Visualforce pages are created by…
Contact Deletion in Salesforce Marketing Cloud
Cameron Robert from Datarati talks through how the Contact Delete function works, how to use it, and a practical demo of how to build a…
Campaigns in Salesforce | Salesforce Tutorial
Salesforce describes campaigns as “a marketing tactic (or series of tactics) that are designed to achieve specific goals such as increased revenue, leads, adoption, etc.”…
Popular Salesforce Infographics
CRM Predictions 2018
The coming year will be a stirring one for businesses, esp while talking about CRM technology. With the arrival of the prognosticating season, let’s quickly…
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…
All About The Fourth Industrial Revolution | An Infographic
We’re in the midst of the Fourth Industrial Revolution – IoT, innovation and technology are transforming the way we work and customer expectations. Every industry…