Looking at the Documentation:
- Platform Show Toast Event has no mention of toast not working/being supported for Tableau CRM Dashboards.
- Lightning Web Components in Tableau CRM Dashboards also makes no mention of toast not working/being supported.
When prefixing the toast with an alert(),: the alert is showshown, as is a console.log() after the toast, so (so the toast is fired without errors), but no toast message is shown.
handleButtonClick() {
callApexController({ // })
.then( result => {
console.log('Button Clicked'); // shows in console
const evt = new ShowToastEvent({
title: 'Toasty Title',
message: 'My message',
variant: 'success',
mode: 'sticky' });
this.dispatchEvent(evt); // never happens
alert('Boom!'); //shows
})
.catch( error => {
console.log('Something went wrong');
console.error(error); // logs to console correctly
const evt = new ShowToastEvent({
title: 'Toasty Error Title',
message: 'My Error Message',
variant: 'sticky',
});
this.dispatchEvent(evt); // never happens
});
alert('Boom'); // alert shows
}
handleButtonClick() {
callApexController({ // })
.then( result => {
console.log('Button Clicked'); // shows in console
const evt = new ShowToastEvent({
title: 'Toasty Title',
message: 'My message',
variant: 'success',
mode: 'sticky' });
this.dispatchEvent(evt); // never happens
alert('Boom!'); //shows
})
.catch( error => {
console.log('Something went wrong');
console.error(error); // logs to console correctly
const evt = new ShowToastEvent({
title: 'Toasty Error Title',
message: 'My Error Message',
variant: 'sticky',
});
this.dispatchEvent(evt); // never happens
});
alert('Boom'); // alert shows
}
https://developer.salesforce.com/docs/component-library/bundle/lightning-platform-show-toast-event/documentation -> no mention of toast not working
https://developer.salesforce.com/docs/atlas.en-us.bi_dev_guide_lwc_in_db.meta/bi_dev_guide_lwc_in_db/bi_lwc_in_db_overview.htm -> no mention of toast not working