isMemberOf not working in notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
53m ago
Requirement is not sending a notification in case approver is part of specific group. Please find the code I used in notification advanced condition which is not working it seems. Even if approver part of group mentioned, it is sending the notification. Notification is on Approval[sysapproval_approver] table.
script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
46m ago - last edited 43m ago
Hi @VuchiV
Simplest way to do it :
Navigate to System Notifications > Email > Notifications.
Open the notification for approval requests (on sysapproval_approver).
In the When to send tab, add a condition:
- Approver.Group | Is Not | <Name of your Group>
Alternatively, use a script in the Advanced condition field:
var isMember = gs.getUser().getUserByID(current.approver).isMemberOf('<Group_sys_id>') ;
answer = !isMember;
