- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2023 10:38 PM - edited 09-07-2023 10:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2023 11:07 PM - edited 09-07-2023 11:09 PM
Hi @Ankit Kumar6,
Oh! got it your exact need. try this scripts.
var managerRecords = new GlideRecord("sys_user_grmember");
managerRecords.addQuery("user.active=false^user.managerISNOTEMPTY");
managerRecords.query();
while (managerRecords.next()) {
gs.info(managerRecords.user.manager.name.toString());
}
If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers! 👍🏻
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2023 11:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2023 12:02 AM
But here you want something else.
Thanks,
Anshul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2023 11:55 PM
Hi @Ankit Kumar6,
I've tested with the below script which gave the Group manager name for inactive users under the group.
Script:
Thanks,
Anshul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2023 03:00 AM - edited 09-08-2023 03:01 AM
Like in sys_user_group table we have group name field, manager field, and group members.
so my requirement is to get the group name as well as group manager name where all group members are inactive only.
Thanks,
Ankit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2023 03:32 AM
Hi @Ankit Kumar6,
In that case, you can use the above script which I have shared. I will give you group manager name and group name as well.
Thanks,
Anshul