Protection Policy for Script Include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2015 07:50 PM
Hi
I have accidentally set the Protection Policy of a Script Include to Protected, it now wouldn't allow me to make any changes
on script include form.Though I have the admin rights on the instance(Fuji version).
Can somebody tell me how to change this Protection policy ?
Thanks
Hardy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2017 10:16 PM
Hi Pradeep,
Thanks for the resonance, I hope it would also cause the error if we try using the script bv script background module.
Jayant

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2017 10:31 PM
I was able to update the value via background script. I might need to check with the team on this one. Ideally, the script should have thrown an error.
var gr = new GlideRecord('sys_properties');
gr.addQuery('sys_id','3194ef10371120004f6a80f7bcbe5da2');
gr.query();
while(gr.next())
{
gr.value = true;
gr.setWorkflow(false);
gr.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2017 10:37 PM
cool seems to be loop hole.
Thanks,
Jayant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2017 06:07 AM
It certainly is a case of 'just because you can doesn't mean you should'.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2018 03:36 AM
Faced an issue with a Script Include from another Application scope cloned (Insert/Stay) into the Global scope. The Application scope was correctly changed to global, however the policy was accidentally copied across. With a background script I was able to remove the protection. Not recommended to perform this for the out of the box protected script includes to avoid upgrade issues.
Script used:
var gr = new GlideRecord('sys_script_include');
if (gr.get('ADD-SYS-ID-OF-YOUR_SCRIPT-INCLUDE')) {
gs.print('found Script Include' + gr.name);
gr.sys_policy = ''; //Just blank the protection
gr.update();
}
Please mark this when its helpful