-
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
Unlocking Success with Salesforce Sales Cloud: Implementation, Services, Features, and Support
Salesforce Sales Cloud is a robust and comprehensive CRM solution designed to assist companies in managing their sales processes more efficiently. It offers a suite…
Salesforce for NonProfit Complete Guide
It takes more than just enthusiasm and purpose to run a nonprofit. To preserve accountability and transparency, leaders must oversee contributors, grants, volunteers, fundraising efforts,…
Navigating Complex Implementation Challenges with Salesforce Consulting Partners
The complexity of the Salesforce platform often makes it challenging to implement solutions such as Service Cloud, Marketing Cloud, and Sales Cloud. Considering the steep…
Popular Salesforce Videos
Introduction to Flow in Salesforce
This informative video on flows in Salesforce contains the following topics:- 00:00 - Introduction 02:14 - Agenda 02:49 - Flow is Automation 03:35 - The…
Batch Apex In Salesforce | Asynchronous Apex
Asynchronous Apex 1. Batch Apex 2. How to run Batch Apex class 3. Monitor Batch Apex class 4. Examples 5. Points To Remember Upcoming Video…
15 Things You Didn’t Know About Salesforce
In this video we'll try to answer the following questions: What is Salesforce and why it is used? What is the job of Salesforce developer?…
Popular Salesforce Infographics
How Customer Experience Is Rewriting the Rules of Business Success
Your guide to customer experience - Customers expectations are changing. And as they change, businesses face sky high standards for delivering customer experience that's a…
Top 5 ETL Tools for Salesforce Data Migration
There are plenty of ETL tools for Salesforce in the market, with varying degrees of functionality and popularity. All tools are more or less the…
Know 5 Reasons to Use Salesforce for Your Business
Salesforce is a customer relationship management (CRM) platform that can be used by businesses of all sizes to manage and analyze customer interactions and data.…