Print assignment group group and their members in which current logged in user is present
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2024 05:49 AM
hi ,
I want to display assignment group names and their members in which current logged in user is part of?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2024 06:36 AM
Where do you want to display that and more important: why?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2024 06:46 AM
in background or fix script

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2024 07:51 AM
@Shubham_verma Here are two ways you can find it.
1: Via List:
Add the following filter in the list.
2. Via Script:
var sysGroup = new GlideRecord('sys_user_grmember');
sysGroup.addEncodedQuery('group.sys_idINjavascript: gs.getUser().getMyGroups();');
sysGroup.query();
while(sysGroup.next()){
gs.info('Group Name '+sysGroup.group.name);
gs.info('Member Name '+sysGroup.user.name);
}
Hope this helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2024 06:47 AM
it's only showing total run time when I executed this in fix script.It's not showing group names n members