- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2020 06:05 AM
Hi All,
There is UI Action on problem table "Start Fix" and its out of box condition is:
current.canWrite()&&(current.state != ProblemState.STATES.FIX_IN_PROGRESS)&&new ProblemStateUtils().
validateStateTransition(current,ProblemState.STATES.FIX_IN_PROGRESS)
I wanted to it to be visible to "XYZ" group only, so i added it like:
current.canWrite()&&(current.state != ProblemState.STATES.FIX_IN_PROGRESS)&&new ProblemStateUtils().
validateStateTransition(current,ProblemState.STATES.FIX_IN_PROGRESS)&&gs.getUser().isMemberOf('XYZ')
This was working as i wanted but even it is restricting to "admin" as well if admin is not member of XYZ.
So again i changed the condition as below but it is still working as before, not showing "Satrt Fix" ui action to admin if admin is not member of XYZ.
current.canWrite()&&(current.state != ProblemState.STATES.FIX_IN_PROGRESS)&&new ProblemStateUtils().
validateStateTransition(current,ProblemState.STATES.FIX_IN_PROGRESS)&&((gs.getUser().isMemberOf('XYZ'))||(gs.getUser.hasRole('admin')))
Please check and suggest me the solution.
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2020 08:31 AM
Hi Ajeet,
Try replacing with this in your condition. ||gs.getUser().hasRole('admin');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2020 06:42 AM
ServiceNow actually recommends changing such out-of-the-box components instead of deactivating them. So deactivating - what we also used to do - is against best practice.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2020 07:12 AM
Thank you Mark and Congratulations for MVP 2020.
I didn't know that ServiceNow recommends doing that.
I was told by my peers that when a upgrade happens it excludes upgrades for UI actions which are customized.
Im curious to know, what happens if I have to revert back to OOB button which is excluded in last upgrade.
Is there a way that we can upgrade a single UI action instead of whole instance?
Please let me know!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2020 07:41 AM
The UI Action would likely be mentioned on the Skipped Updates. After every patch and upgrade, you should go through all Skipped Updates.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2020 08:24 AM
Thank You Mark!!
I thought Skipped updates are only checked when you do a major upgrade from Release to Release. Now I'll take a note of it.
Thanks again 🙂 !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2020 07:23 AM
I Mark,
I cloned the Start Fix to StartFix and put the condition you gave but still it is not visible to admin and only visible to XYZ group.
dont know how it will work 😞