-
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
Deployment on Production Environment in Salesforce
When we move any code or component into a production environment we need to keep the below terms for our understanding: These terms are-: Change…
Assign Permission Set at the User Creation Made Simple: What You Need to Know | Salesforce Guide
Step 1: Create a Permission Set Step 2: Create a Record- Triggered Flow to Assign Permission Set at the time of User Creation Don't forget…
What Are The Benefits of A Salesforce Consulting Partner
Salesforce Consulting services help the organizations to fulfill their business needs by assisting them in projects like Salesforce implementation, data integration, customization, AppExchange, and many more.…
Popular Salesforce Videos
How Do You Select the Right Salesforce Implementation and Transformation Partner?
Looking for Salesforce Certifications while choosing a Salesforce Implementation Partner is no more just enough. In this video Our CEO Jayant Umrani explaining about the…
How To Get Exam Voucher For Salesforce?
Wondering How To Get Exam Vouchers For Salesforce? Join this useful group for Salesforce job & career info and learn all you need to know…
Popular Salesforce Infographics
How to Choose the Right Salesforce Partner
Choosing the right partner is a key factor that could make or break your project’s success. Salesforce is a mighty CRM platform, and that’s why…
5 Advantages of Using The Salesforce Data Migration Tool in Your Organization
Advantages Of Using The Salesforce CRM Data Migration Services In Your Company are: Fast migration process Repetitive deployment Suitable for both novice and advanced Salesforce…
Timing is Everything : Understanding B2B Buyer Behavior
B2B buyer activity and research peaks at different times of the year, week, and day. Software Advice conducted a study gathering data from six million…