Cancel Chang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
I have this story to develop in Australia version; I need to inactive the ootb UI action and create a custom one for this requirement, also wanted to use the ootb mandatory cancellation reason prompt.
is it possible directly from the UI action without creating a script include. Can someone please provide a solution for this.
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
34m ago
Try this:
- Make Cancellation Reason Mandatory
you can use a UI policy to make the Closure notes or a specific Reason field mandatory whenever the state changes to Canceled.
- Table: Change Request [change_request]
- Condition: State is Canceled
- UI Policy Actions: Set Closure notes (or your custom Cancellation reason field) to Mandatory = true and Visible = true.
- To ensure users only see the "Cancel" button based on your specified roles and states, modify the conditions on the OOB Cancel Change UI Action:
Name: Cancel Change
Table: Change Request
Form button: Checked
Condition (Paste this into the Condition field):
new ChangeRequestStateHandler().isCancelAllowed(current) || (current.type == 'normal' && (gs.getUser().isMemberOf(current.assignment_group) && (current.state == 'new' || current.state == 'assess' || current.state == 'authorize' || current.state == 'scheduled') || gs.hasRole('change_manager'))) || (current.type == 'standard' && (gs.getUser().isMemberOf(current.assignmentgroup) && (current.state == 'new' || current.state == 'assess' || current.state == 'authorize' || current.state == 'scheduled') || gs.hasRole('change_manager'))) || (current.type == 'emergency' && (gs.getUser().isMemberOf(current.assignmentgroup) && (current.state == 'new' || current.state == 'assess' || current.state == 'authorize' || current.state == 'scheduled') || gs.hasRole('change_manager') || gs.hasRole('major_incident_manager')))
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti