- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2015 09:25 AM
I am trying to restrict the Ui action button only to certain groups
gs.getUser().isMemberOf('group1'&&'group2') this doesn't work
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2015 10:19 AM
try gs.getUser().isMemberOf('group1') && gs.getUser().isMemberOf('group2')
Do you really want AND here, or do you want OR?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2015 12:05 PM
Hi Kumar,
Can you please refer the below demo where it is working fine. On your instance make sure that the group display name is passed properly.
You can run the same from Background script and see if it gives your true or false.
https://demo007.service-now.com/login.do
Username : admin
Password : admin
Steps for testing : Group button on incident table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2015 01:58 PM
The AND condition worked