-
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
Useful Salesforce Steps and Instructions – Part 3
Hello All, Here's an another part for various steps and instruction that are very useful in Salesforce. Steps to add picklist values for specific record type:…
A Complete Guide to Salesforce Org Migration: Steps, Best Practices, and Common Pitfalls
A Salesforce organization migration is a big task that needs to be planned carefully and carried out expertly. For organizations looking to streamline processes, consolidate…
Create and Insert Record in LWC Without Using record-edit-form | Salesforce Developer Guide
In this blog, we will learn how to create and insert records in Lightning Web Component (LWC) Without Using record-edit-form. Let's create Lightning Web Component…
Popular Salesforce Videos
How to Edit List View Filters in Accounts and Contacts Tabs | Salesforce
Watch this video to learn How to Edit List View Filters in ‘Accounts’ and ‘Contacts’ Tabs. If you find anything confusing or have any questions,…
Introduction to Salesforce and Data Modeling | Quick Start | Episode 1
In this video, you will get started with Salesforce Development and build Salesforce Applications without writing code. Watch this video and learn. 00:00:00 - Start…
What are Custom Page Layout in Salesforce?
Custom Page Layout is creating its own layout and modifying the same layout which we have created. Watch this video to learn all about Custom…
Popular Salesforce Infographics
How Salesforce Brings Success To Full Cycle Sales Representatives?
A full cycle sales representative is the one who handles the entire deals right start from the prospecting to engage with clients and to closing…
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…
How To Upgrade Your Business With Salesforce?
Salesforce has been stretching the possibilities of business growth right from its inception in 1999. Its fierce business model attracted people who eventually moved to…