How to stop both notifications from triggering
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2024 06:09 AM
I have a generic email approval notifications and their being triggered at the same time in my workflow as I have two approval requests being actioned at the same time:
I need it to not send the other notification if the group is this specific group how to make the code work?
Notification 1:
Notification 2:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2024 06:53 AM
Please cross check the condition for when trigger the notification, there will a small catch due to that both conditions are met and triggering the notification.
Please appreciate the efforts of community contributors by marking appropriate response as Mark my Answer Helpful or Accept Solution this may help other community users to follow correct solution in future.
Thanks
AJ
Linkedin Profile:- https://www.linkedin.com/in/ajay-kumar-66a91385/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2024 06:57 AM
I went with but its now triggering both emails:
notification 1:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2024 09:11 AM
theirs only one condition the group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2024 08:28 AM - edited 01-16-2024 08:37 AM
Let change the line number 3 in your script.
From
var group = group.assignment_group;
To
var group = item.assignment_group;
You can also give my sample a try.
Notification 1
current.getValue('source_table') === 'sc_req_item' && current.sysapproval.assignment_group.toString() !== 'ec711d8d1b0921904d480d01cd4bcb11';
Notification 2
current.getValue('source_table') === 'sc_req_item' && current.sysapproval.assignment_group.toString() === 'ec711d8d1b0921904d480d01cd4bcb11';
Cheers,
Tai Vu