How to modify oob script include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 09:35 PM
Hello Team,
How can I modify the OOB script include if required?
what is the best way to implement the requirement without touch oob script include?
Regards
Anil Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 09:40 PM
As it is not recommended to modify the OOB script include, instead you can do a Insert and stay and add one more reusable function inside it. (for you logic).
Please mark as helpful/correct. if it helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 09:43 PM
Hi Anil,
Modifying out-of-the-box (OOB) script includes can be very risky, as it can impact system functionality and may be overwritten when upgrading or patching ServiceNow.
To modify an OOB script include without touching the original OOB file, you can create a new script include that extends the OOB script include and overrides the functions or properties that need to be modified.
Here are the steps to create a new script include that extends an OOB script include:
- Navigate to "System Definition" > "Script Includes" in the ServiceNow navigation menu.
- Click the "New" button to create a new script include.
- Enter a name for the new script include, and choose the "Extends" checkbox.
- Select the OOB script include that you want to extend from the "Extends Script" dropdown.
- Override the functions or properties that need to be modified in the "Script" section of the new script include.
- Save the new script include.
In your code, instead of using the OOB script include, use your custom script include that extends the OOB script include. The system will use your custom script include instead of the OOB script include, and the modifications you made in the custom script include will be applied.
Please mark helpful or correct if its helping
Thank you
Vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 10:00 PM
Thanks Vijay but How can i Override the functions or properties? Please share one example.