To check user belongs to a group
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2018 04:48 AM
Script to check if the logged in user belongs to any one of the groups?( Not a specific group, any one of the group)
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2018 05:08 AM
There are already multiple response but assuming that you have the list of sys id or the group name in an array, this should help
var grpList = 'contains comma separated group details';
for(var i =0 ;i<grpList.length;i++){
if(gs.getUser().isMemberOf(grpList[i].trim()))
return true;
}