The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Protection Policy for Script Include

snow_hard252
Kilo Contributor

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

20 REPLIES 20

gerardogutierr1
ServiceNow Employee
ServiceNow Employee

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


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

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.


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


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();