How to override IncidentUtils script Include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 08:59 AM
Good Afternoon All,
I have a requirement where I need to only allow users with the major incident management role to be able to close an incident in the esc portal. I can see that this is controlled within the IncidentUtils script include and IncidentUtilsSNC script include.
How can amend this script include to allow for this behaviour? Can i override the function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 11:36 AM
Hey @Luke James,
If the name of a Script Include contains 'SNC', you won't be able to modify it due to its protection policy. Instead, ServiceNow added another Script Include that extends from these Script Includes (i.e. the ones without 'SNC' in the name) to be customizable without impacting the original script.
So yes, you can modify the 'canCloseIncident' function within IncidentUtils.
Cheers

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 11:48 AM
You can create a copy of these script includes so that you dont impact the upgrades in future. And then call the new script includes wherever required.
Another option would be to make changes to the ACL directly to allow only major incident to close the incident.
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 12:54 PM
Hi @Luke James ,
Please refer to below thread:
https://www.servicenow.com/community/itsm-forum/reopen-button-on-london-release/m-p/890612
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda