Check if user is member of servicenow group in client script

scocuzza
Kilo Contributor

I need to remove certain options from a dropdown field based on whether the current user is a member of a "Database application support" group that we have in our service now instance, but i cannot use the following

if (gs.getUser().isMemberOf('Database Application Support')) {

}else{

}

The object "gs" should not be used in client scripts.

 

How can I check if the user is a member of this group?