How to exclude recipients in a notification using email script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2024 10:19 AM
I have 2 notifications-one on request table [A] and one on request item table [B] which trigger when a catalog item Z is requested. The cat item has a field named company . If the value of the company is X, then the emails should not go to the requested for. How can I achieve this using an email script or otherwise?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2024 11:16 AM
Hello @Aditya Sinha,
Do not add Requested for in the who will receive section.
Please mark my answer helpful and hit the thumb button.
Thank you.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2024 11:47 AM
Hello @Aditya Sinha,
If the second notification is triggered only for a specifi catalog item, you can build your condition as shown in this screenshot. Additionally, don't forget to create a property that stores the sys_id of the company
However, if your notification is used by other catalog items, you'll need to script your condition. In the script, verify if the sys_id of the catalog item is the same as the sys_id stored in the property you created earlier, and also confirm the company.
answer = true;
if(current.variables.name_of_your_variable==gs.getProperty('company') && current.item==gs.getProperty('item')){
answer = false;
}
I hope you find this helpful!
Best regards,
Hajar