Difference between revisions of "Toaster Message"
From AgileApps Support Wiki
Wikidevuser (talk | contribs) (Created page with "'''What is a Toaster Message?'''<br> Add a generic description. Users can pass a custom toaster using JavaScript. You can use the invocation steps mentioned in the below secti...") |
Wikidevuser (talk | contribs) |
||
Line 1: | Line 1: | ||
==What is a Toaster Message?== | |||
A toaster message is a brief pop-up notification that provides real-time feedback or alerts to users. It typically informs users about the success, errors, or warnings related to their actions without interrupting their workflow. Users can pass a custom toaster using JavaScript. You can use the invocation steps mentioned in the below section to pass the custom toaster message.<br> | |||
==Scripts== | |||
For using this script as a function: | For using this script as a function: | ||
<pre> | <pre> |
Revision as of 10:37, 23 August 2024
What is a Toaster Message?
A toaster message is a brief pop-up notification that provides real-time feedback or alerts to users. It typically informs users about the success, errors, or warnings related to their actions without interrupting their workflow. Users can pass a custom toaster using JavaScript. You can use the invocation steps mentioned in the below section to pass the custom toaster message.
Scripts
For using this script as a function:
function custToast(type, message) { const cancelButton = document.querySelectorAll('#createNewRecordButton')[0]; cancelButton.dispatchEvent(new CustomEvent("toasterEvent", { bubbles: false, detail: { toasterType: type(danger/success/warning), description: message(Enter the custom message) } })); } setTimeout(()=>{ custToast("success","This is a Success Toast")},3000) ==> To use this function with 3 sec timout custToast("danger","This is a Error Toast") custToast("warning","This is a warning Toast")
For using individually in Form Scripts/Field Scripts/Browser Console:
const cancelButton = document.querySelectorAll('#createNewRecordButton')[0]; cancelButton.dispatchEvent(new CustomEvent("toasterEvent", { bubbles: false, detail: { toasterType: "danger", description: "Toast Danger message" } }));