Write the script on the notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2024 12:39 AM
I created one notification on approval table and need to write a advanced condition when subcategory doesn't contains "Lease" word email will trigger and if it's contain that word, won't trigger. Can someone help here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2024 01:10 AM
Hi @PRAGHATIESH S ,
You can add script in the "advance condition" to fullfill this requirement.
I have provided the script below, feel free to make custom changes in it.
// Check if the subcategory does not contain the word "Lease"
if (current.subcategory.indexOf("Lease") == -1) {
answer = true;
} else {
answer = false;
}
Thanks,
Hope this helps you! Let me know by accepting the solution and giving a thumbs up!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2024 01:58 AM
Hi @PRAGHATIESH S ,
use below script in advance condition of notification, I tested in PDI its working fine,
// Check if the current record's subcategory contain the word "Lease" if Yes then do not trigger else trigger notif
if (current.short_description.includes('Lease')) { // change short_description with subcategory backend name
answer = false; // Do not trigger the notification
} else {
answer = true; // Trigger the notification
}
FYR:
If my response helped you, please click on "Accept as solution" and mark it as helpful.
Thanks
Suraj