group member inactive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 09:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 09:35 PM
Hello @keerthi35
You can create a Notification on the sys_user table and condition active changes to false and set the subject and mail body.
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 09:50 PM
Hi @keerthi35
Help me with a query, suppose a user is deactivated and if user is member of 30 40 groups, all of the group managers should be informed.
If that's the case, you might want to reconsider this since it will result in triggering so many emails.
Better approach would be to build a report and share with the group managers and let them monitor it if there is an inactive user in the group.
If you still want to pursue the requirement, you will need to write a BR on the sys_user table and find the user's group by gliding the sys_user_grmember table and get the group's manager, create an event and trigger that using gs.eventQueue(), to launch a notification
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 09:59 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 10:34 PM
hello @Aman Kumar S
i am writing this code but didn't get answer
var gr = new GlideRecord('sys_user_grmember');
gr.addEncodedQuery('active=true^member.active=false');
gr.query();
while(gr.next()){
var groupManagerEmailIds = '';
var gruserManagerEmail = new GlideRecord('sys_user_group');
gruserManagerEmail.adddQuery('group', gr.sys_id);
gruserManagerEmail.query();
while(gruserManagerEmail.next())
{
groupManagerEmailIds+ ',' + gruserManagerEmail.user.email;
}
gs.eventQueue("member.left",gr,groupManagerEmailIds,"");
}