Client Script field is disabled

AymenBM
Tera Contributor

Hello,

I am getting this message when I try to create a new client script:

New client-scripts are run in strict mode, with direct DOM access disabled. Access to jQuery, prototype and the window object are likewise disabled. To disable this on a per-script basis, configure this form and add the "Isolate script" field. To disable this feature for all new globally-scoped client-side scripts set the system property "glide.script.block.client.globals" to false.

 

I have added the "Isolate Script" field but I have always the same problem (see attached).

Can you help me please !

 

Thank you very much for your help!

1 ACCEPTED SOLUTION

Yes you need admin role that's what i was referring to.

If the issue is solved. can you please mark my answer as correct.

Thanks.

View solution in original post

15 REPLIES 15

Saurav11
Kilo Patron
Kilo Patron

Hello,

That is a default message which Servicenow gives while creating client script. it is not an error. You can freely write your code.

That is just to tell that if we want to do any DOM manipulation we have to make the isolate script check false.

But as i said that message is always displayed nothing to worry about it is not any error

Screenshot from my PDI:-

find_real_file.png

Please mark answer correct/helpful based on Impact.

Jaspal Singh
Mega Patron
Mega Patron

It is not an issue as such but info message & can be ignored. Adding Isolate field on the form will not let the infor message to disappear.

Refer blog for additional details.

AymenBM
Tera Contributor

Jaspal, Saurav,

 

But how can I write a script? the field is disabled.

 

Thank you!

Just ensure the Scope is same as that of the script.

You see a field Application: Finance Case management on the page you need to ensure it is same scope you are in.

Go to Settings on the instance(next to your name) & then Developer. Select Application as Finance Case management