-
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
Salesforce Lightning vs Classic: How Lightning Has Proved its Worth Against Classic
Introduction Talk of Salesforce world and the answer will echo in the form of Lightning. People are going crazy behind it and even most of…
To Do Checklist Before Code Commit In Production
TO DO CHECKLIST BEFORE CODE COMMIT IN PRODUCTION Proper commenting in code (Test Class, Apex Class, Trigger, Vf page), if you modified or create new…
Salesforce Interview Question - Part 5
1. What is an Object? An object in Salesforce is a fundamental data structure used to store and manage data. Objects can represent various types…
Popular Salesforce Videos
Salesforce Integration Tutorial | Integrate Salesforce with Apps
This "?????????? ??????????? ????????" video by Edureka will help you understand what is Salesforce integration in detail. It will also address the various Salesforce integration…
Crash Course on Apex Triggers Salesforce | Complete Guide with Real Time Scenarios
Complete guide on Apex Triggers Salesforce 0:00 Intro 0:33 Is Triggers difficult to Learn 0:50 What is Trigger? 3:03 What are Trigger events? 11:55 How…
Salesforce Web-to-Case in under 5 Minutes
we'll see how to make a Salesforce Web-to-Case form quickly and easily, and how to embed it in our Word press website. This whole process…
Popular Salesforce Infographics
Salesforce – The Future of Digital Transformation | An Infographic
Salesforce has been coined as the world’s top CRM company and customer company. It has been soaring high in the clouds, so let’s brush through…
Salesforce Admin Certification Path
This infographic helps you to understand the complete certification path to become Salesforce Administrator which includes accreditation body, pre-requisites, eligibility criteria, examination format and career…
Salesforce Administrator Salaries – Around The World
A Salesforce administrator; the gatekeeper to an organisation’s Salesforce capabilities. With the huge acceleration of data in our lives, it’s no surprise that job roles…