-
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
Drive Financial Growth with Sage Intacct Consulting Benefits
Businesses must keep ahead of the curve in an ever-changing business climate by using the appropriate solutions. Sage Intacct, a financial management tool designed to…
Salesforce Integration Cloud: Accelerating Customer’s Digital Transformation
The connoisseurs of Salesforce were totally intrigued by the acquisition of Mulesoft for a whopping $6.5B, and the excitement reached its peak with the announcement…
Popular Salesforce Videos
What is Approval Process in Salesforce?
Automated process that approves records for the organization and it can be defined with a sequence of steps. Watch the video to learn and if…
Non-technical But Want to Build Career in Salesforce?
In this video Shrey gave the answer to the following questions: 1. What is the next step after doing Certification in Salesforce Administrator? 2. How…
Object Oriented Programming - Salesforce Developer Tutorial
In relation to programming languages, object-oriented means that the code focuses on describing objects. An object can be anything that has unique characteristics, such as…
Popular Salesforce Infographics
How to Use Psychology to Target Your Buyer?
Ever wanted to get into the minds of your customers and figure out how they think? Ever wanted to know the best methods to convince…
Einstein in Action – Unleash the Power of AI in Salesforce
Drowning in data but thirsty for insights? Salesforce Einstein can be your life raft. This infographic dives into the world of AI for CRM, exploring…
How Salesforce Improves User Experience Through Hyper-Personalization?
Personalized service has become an imperative part for any business to succeed in the cut-throat competitive market. 66% of people want companies to understand their…