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

I tried the below background script



var a = new GlideRecord('sys_ui_page');


a.addQuery('sys_id','....sys_id of UI page...');


a.query();


if(a.next())


{


gs.print(a.sys_policy);


a.sys_policy = '';


a.update();


}



This made the sys_policy blank after whch I was able to edit the page.


Hello Pradeep,

Good noon, any light on how to update the protection policy ?

 

The SN Nerd
Giga Sage
Giga Sage

If you are an admin and you are on the instance which the application was created, or imported via Update Set, you should be able to edit it.


I've had no problems making Script Includes protected and read only and have been able to modify it.



If your circumstances match the above, this is definitely a defect and should be raised with ServiceNow.


There is good reason why the protections are in place and if you do manage to bypass it, that is a serious security hole in ServiceNow and should be raised as a defect in itself.



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

Hi Paul,



I am trying to change the system property for glide.db.clone.allow_clone_target from sys_property.list table.


I have admin privilege but still I am facing the same issue, can you please suggest.



Thanks,


Jayant


Hello Jayant,



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.