How can I revert customized OOTB script to Store version if this script was committed via update set on all instances

Alex150
Mega Sage

Hello,

ServiceNow recommended set "Replace on upgrade" to true on Custom Updates table if OOTB script was changed It's a good way if it was done before an upgrade, but what should we do if an instance has already upgraded? I wonder if there is a different way to do it? 

What do you think? What is the best practices? 

10 REPLIES 10

bammar
Kilo Sage
Kilo Sage

Ok So what you are doing is if you say adjust an existing script to make it work better with your organization OR fix a legitimate issue before ServiceNow patches it OR to enhance it- Replace on upgrade on all custome updates basically means- in the future IF that script is every updated by ServiceNow you will get the update and you will loose what you did -  I beleive if the instance has upgraded you can go to the script and add the related list to view History and revert back if necessary,

Some scripts may be forever untouched even by upgrades or may take years. Its shaky ground to make a blanket replace on upgrade unless you examine the scripts that will be updated to see if your loosing the functionality you had before with customization OR understanding what has changed.

I would try to do the following

*AVOID CHANGING OOB Business rules if you can- But if you do when subprod is patched or upgraded- review skipped changes- then you can maintain the item and decide to keep it or not

* Make your own Business rules that work together with existing- these will never be overwritten...

 

 

Hi,

I know that we shouldn't change scripts. If company has many developers any onw can do it and we must be ready to fix it. I'm trying to find out what we should do if this situating would have happened.

Make sure all your developers have the same instructions: don't change OOB scripts, but copy them and if there is no other way than changing them, add comments to the script on what changed and most importantly: WHY. It will be a lot of searching if you only know that a script isn't OOB and not why. 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Martin Kj_r
Giga Contributor

I believe best practice is, to not change OOTB Business Rules and scripts. Instead create a copy of them, deactivate the old rule/script and edit the copy as required.

 

But when you upgrade ServiceNow skips OOTB Business Rules and scripts that has been edited.

You can find skipped records in Upgrade Monitor.

Skipped records can be reverted to OOTB functionality for the current version of ServiceNow or you can maintain the edited record if you want.

Alex150
Mega Sage

If somebody have the same question, please Enroll and pass following course. All steps described clearly