Can I duplicate the OOTB script include?

Paul125
Kilo Guru

We've modified couple of ootb script includes in the past. Right now they are being skipped as part of upgrade process. We are currently working on these script includes to revert back to base versions by creating duplicates for the ootb ones. So that they can't get skipped in the future upgrades. Any how our customized versions are still important to us, we wanna use them anyway. I have few questions before I move on with this task.

1. Can I duplicate the ootb script include with same name and make ootb one deactivate?(idea here is to use our customized one and keep the ootb one as is)

Thanks for your suggestions.

1 ACCEPTED SOLUTION

Alikutty A
Tera Sage

Yes and No depending on your customization.

If you are planning to make large or complex changes then it is better to take a copy of it and work on it.  But if the changes are minor, then it is always better to modify the OOB changes as this will help you in reviewing new changes from Service Now every time an upgrade is performed and accept or merge the new features or fixes added.

Thanks!

View solution in original post

6 REPLIES 6

Alikutty A
Tera Sage

Yes and No depending on your customization.

If you are planning to make large or complex changes then it is better to take a copy of it and work on it.  But if the changes are minor, then it is always better to modify the OOB changes as this will help you in reviewing new changes from Service Now every time an upgrade is performed and accept or merge the new features or fixes added.

Thanks!

Paul125
Kilo Guru

Thanks for the reply. My assumption here is even though I use the same name for the duplicate one and active-false the ootb script include won't affect or ootb one won't be called anywhere as it is false? Thanks!

Hi Paul,

 

You are correct. The best practice is to inactivate the OOTB script include and create a copy of it via "Insert and stay" action. When simply changing the Active Flag on an OOTB record from TRUE to FALSE (or vice versa), a Customer Update record will be created, however, the Replace-on-Upgrade flag for the record will be set to TRUE, meaning that the record will still be upgraded during upgrades, but the record will not be reactivated. In short, the record will get upgraded, but it will still be inactive.

https://docs.servicenow.com/bundle/jakarta-application-development/page/build/system-update-sets/task/t_OverwriteCustomizsDuringUpgrades.html

You can also refer Extension Points (Starting with London😞 Use extension points in the scoped or global base code to designate where custom scripts can be called to extend the functionality of an application. Using extension points makes it easier to integrate customizations without actually altering the base code for an application. It also prevents breakage of custom script interactions that often occurs after an upgrade when you directly embed the custom code into the base code.

https://docs.servicenow.com/bundle/london-application-development/page/build/applications/concept/extension-points.html

 

-Pradeep Sharma

Thanks Pradeep. That's a lot of information.