How to enable Isolate Script in Case Form?

Syed Asad
Kilo Contributor

Hi,
I am new to the ServiceNow community and I am facing issues in accessing DOM Objects like getElementById() in Client Script. I have imported an application and I am getting this message :

New client scripts are run in strict mode, with direct DOM access disabled. Access to jQuery, prototype, and the window object is 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 referred to this Article https://community.servicenow.com/community?id=community_blog&sys_id=c5c46364dbba6b007d3e02d5ca9619cb Which says I need to Uncheck Isolate Script Checkbox. But Isolate Script field is not visible in the Form Design configuration. 

Please help me understand how I can access DOM objects in Client Script in a custom application and where I will get this Isolate script in case form? Any help will be much appreciated.

Please refer to the Screenshots.

Thanks!

6 REPLIES 6

Hi Syed Asad,


If I helped you to resolve your query with my answer. Then I would really appreciate if you can mark my answer correct and helpful. So that it can be moved to answered list and helpful for future readers.

Regards,
Ujjawal

Maik Skoddow
Tera Patron
Tera Patron

Hi

you shouldn't ask for a solution which is not recommended (DOM manipulation) but explain what your business requirement is.

Then we can find a suitable solution which won't break at the next ServiceNow upgrade.

Therefore please explain what youwant to reach and provide all necessary details.

Kind regards
Maik