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
‎04-15-2015 12:33 PM
I found this information in the wiki that might be helpful.
2.2 Protecting Application Files
Some application code shipped with the ServiceNow system requires special protection. When an application file has a Read-only protection policy, nobody can modify the related record. Only a ServiceNow employee can alter the protection policy and then modify the application file or its related record. A ServiceNow employee cannot make any changes without changing the policy designation first.
To prevent customizations from being overwritten by system upgrades, the upgrade process automatically skips changes to customer-updated records. If you modify an application file or related record that is later designated as Read-only in an upgrade, the application file maintains the default protection policy of Write. You keep the existing modifications and can continue modifying the records.
Application Files - ServiceNow Wiki

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2015 12:38 PM
Hi Hardy,
On your author instance you should be able to change the protection policy. Please let me know if you are still facing this issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2015 07:33 PM
HI Pradeep,
Thanks for response.
I'm facing the issue despite me being 'admin' and I have created this Script include.
When you say author instance, I presume its the dev instance which I'm working on?
Thanks
Hardy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2015 11:48 AM
Don't know if you found the answer, but this worked for me:
var gr = new GlideRecord("sys_metadata");
gr.get("120c9e354f994200e38d27118110c7d8");
gs.print(gr.sys_policy);
gr.sys_policy="";
gs.print(gr.sys_policy);
gr.update();