How to get inactive members in each group and an email should trigger to individual manager
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2024 05:36 AM
Hi All,
I am working on a requirement to get inactive members in each group and to send an email to managers with the inactive user details in their group
--> i am trying with below code :
var gr=new GlideAggregate('sys_user_grmember');
gr.addQuery('user.active',false);
gr.addQuery('manager.active',true);
gr.groupBy('group');
gr.query();
while(gr.next())
{
gs.log(gr.group.name+':::'+gr.group.manager.user_name);
}
I am getting the groups and managers list with this , but not getting how to send email to these managers with inactive user details ??
this should trigger every 6 months , so i am trying this code in a schedule job
please help how to send inactive user details in the email , i have event and notification already .
@Ankur Bawiskar please provide your inputs
Thank you,
Shabbir Shaik
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2024 11:57 PM
Hi @shabbir5
Flow will be an alternate no-code and efficient way to handle this requirement as suggested by @Mark Manders . Please give it a try and let us know if you face any issues,
Thanks and Regards
Amit Verma
Thanks and Regards
Amit Verma
Amit Verma
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2024 05:30 AM
I agree with Mark here.
Please share the status once you try that flow option
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
