How to revert to new a change request that is in 'authorize' state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2020 05:36 AM
Hi,
Using the 'Revert to new' ui action how do i move the change back to new when its state is authorize?
what do i add to the script
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2020 05:52 AM
Hi,
Is the current code not reverting it? Are you saying this UI action should be visible only when State is Authorize?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2020 06:12 AM
The current code is not reverting it and yes it should be visible only when the state is 'Authorize'
Regards
Carol Banda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2020 06:29 AM
Hi,
For visibility you need to add check in UI action condition
current.state == 'Authorize'
Can you check if that script include has that function?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2020 07:11 AM
this is whats in the condition i think its out of box:
current.state.canWrite() && ((current.type == ChangeRequest.EMERGENCY && new ChangeRequest(current).isAuthorize()) || (current.type == ChangeRequest.NORMAL && new ChangeRequest(current).isAssess()))