-
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
Develop in Production: Insane or Inspired?
Accelerating implementation We all know the benefits of accelerating and streamlining the release cycle; the business is more agile and reduced development effort. But there…
Plauti Offers Flow Action Capabilities on Duplicate Check for Salesforce AppExchange
Plauti today announced it has updated Duplicate Check on Salesforce AppExchange, providing customers new ways to integrate the checking and merging of duplicate records into their…
Unlocking the Potential of Salesforce AI for Marketing Teams
In the current digital landscape, companies apply technology every chance they get to stay ahead of the competition. Marketing teams are especially taking to advanced…
Popular Salesforce Videos
Difference between B2B, B2C and B2B2C Salesforce Commerce Cloud?
There is a lot of buzz about the Salesforce commerce cloud and its effective offerings. Let’s dive deep into the world of Salesforce and the…
Similarity and Difference Between SFRA and PWA | Which One to Choose? | Salesforce
Choosing SFCC as the platform necessitates a major decision: on what architecture will your channels be based? When learning about Salesforce B2C Commerce Cloud, you'll…
Add Intelligence to Any Salesforce App with Einstein Discovery
Bring intelligence in the context on any Force.com app thanks to the power of Einstein Data Discovery. Any Salesforce Admin or Developer can add in…
Popular Salesforce Infographics
Why Do Business Move To Salesforce?
Salesforce Improves Customer Data Quality & Management – One of the core functions of all CRMs is data management about customers. Salesforce delivers in this…
Swith To Salesforce Lightning to Unlock enhanched productivity
Struggling to build responsive Salesforce apps for your enterprise? Switch to Salesforce Lightning today to build next-level custom applications that deliver rich enterprise experiences. Learn…
How To Sell Better in 2020 | Tips From Salesforce Leaders
There are various things that you need to pay heed on while selling something. In 2020, where technology is ruling the world, and we are…