- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2017 10:42 AM
We have a group in ServiceNow who are managers. I'm wanting to limit the OOB 'Create Outage' UI action to only that manager group. This is an OOB UI action that is activated when you activate the task-outage relationship plugin.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2017 12:24 PM
Condition should be something like below
(current.getRecordClassName() == 'incident' || current.getRecordClassName() == 'problem') && gs.getUser().isMemberOf('SN_IT Managers')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2017 10:49 AM
Allison,
Try myUserObject.isMemberOf().. gs.isMemberOf('<groupname>')
Wiki http://wiki.servicenow.com/index.php?title=Getting_a_User_Object#gsc.tab=0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2017 11:48 AM
Would I add this to the condition field or in the script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2017 12:11 PM
Yes add an && condition followed by gs.getUser().isMemberOf('GROUP_NAME or SYS_ID' )
(rest of condition) && gs.getUser().isMemberOf('GROUP_NAME or SYS_ID' )

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2017 11:21 AM
just a small change to @Patrick
You need to have getUser object
gs.getUser().isMemberOf('GROUP_NAME or SYS_ID' )