User not part of group but still receiving notifications.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-17-2022 10:49 PM
User is receiving notifications for group but he is not part of the group.
Notification is on sn_hr_core_case table. It gets sent when event is fired. Who will receive has Event parm 1 contains recipient checked and Send to event creator checked.
Business Rule is on sn_hr_core_case table. It runs after insert/update on conditions State is Work in Progress and Assigned to is empty.
Following is the BR script, please validate if the script is correct or need any changes. I feel we need to query with group.sys_id as it is reference field.
(function executeRule(current, previous /*null when async*/ ) {
/*en = En = English or (System Default English)*/
var approverGr = new GlideRecord("sys_user_grmember");
approverGr.addQuery('group', current.assignment_group);
approverGr.query();
var approverList = [];
while (approverGr.next()) {
approverList.push(approverGr.getValue("user"));
}
gs.eventQueue("sn_hr_core.hr.case.assigntogroup.En", current, approverList.join(","));
})(current, previous);
- Labels:
-
Case and Knowledge Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-18-2022 03:03 AM