How to correct override OOB script include ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2020 02:05 AM
Hi guys, could you explain to me how to override OOB script for example consumables? if I just update it with my script it will not update in future versions?
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2020 02:10 AM
Hi Serhii,
You can create a copy of existing script by doing a Insert & Stay & modify the created new script. If you alter OOB then will be excluded from future upgrades but when upgrade happens you do have an option to see that in Skip updates from Upgrade history module & then verify & incorporat it if required.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2020 02:16 AM
If i will deactivate the OOB script, it will be updated ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2020 02:44 AM
Yes, it will be activated again with the upgrade unless you exclude it from being changed after upgrade.
There exists a field Replace on Upgrade that needs to be unchecked if it is to be excluded from upgrade.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2020 02:48 AM
Hi Serhii,
Adding to the previous answers, If you update OOB script includes for your requirements, there is a risk that it may break in future upgrades. Always create a copy of OOB scripts (using Insert and Stay option) and work on then without changing the existing OOB scripts.
However, If you want to overwrite a customization during upgrades then the "Replace on upgrade" field is set to false on the "sys_update_xml" table.
Here is the link for your reference:
Thanks,
Debopriya