once the catalog task is submitted the notification should not be sent to group manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2024 01:17 AM
After submission of Catalog task, Restrict the notification for group manager. Group members only have to receive the notification. How to perform this. where we include this restrictions for notification.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2024 04:43 AM - edited ‎01-30-2024 04:45 AM
You can try this script
var users;
var group = new GlideRecord('sys_user_group');
group.get(current.assignment_group);
var grmember = new GlideRecord('sys_user_grmember');
grmember.addQuery('group',current.assignment_group);
grmember.query();
while(grmember.next()){
if(!grmember.user==group.manager)
users.push(grmember.user.email);
}
gs.eventQueue('event_name',,users);// check the checkbox in notification that param1 contains recipients
Regards,
Piyush Sain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2024 01:46 AM
Hi @Aditya02 ,
You can do this by triggering an Event in Insert BR on catalog task table. In the BR you can get all the members of the group excluding the manager and send the users via parameter
Regards,
Piyush Sain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2024 03:39 AM
so email should be sen to group members only
But what if group manager is also a member?
You will have to use eventQueue based approach, get the group members and exclude group manager and then send the email
what did you start with and where are you stuck?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader