We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to refactor Client Script hitting "Isolate script" / "glide.script.block.client.globals" restric

KanamRamu
Tera Contributor
Hi community,
I am working on a Client Script and encountered the platform message regarding strict mode and disabled DOM/jQuery/window access:
Screenshot 2026-06-10 101004.png

 

4 REPLIES 4

Kieran Anson
Kilo Patron

Hi,

Can you provide some information on what script you're wanting to refactor? Ideally we wouldn't leverage the "isolate" checkbox that is currently not on your form layout as DOM manipulation / access to global data isn't best practice. I can see that you're also in a scope which requires further modification to system properties to allow a scoped app access to the global scope 

Thank you for your response.

I created a simple application in a scoped application and encountered this error while testing the Client Script. I understand that using DOM manipulation and global objects is not considered best practice. I would like to learn the correct approach to refactor this script using supported ServiceNow methods.

Can you share the script and we can aid you in refactoring?

Tanushree Maiti
Tera Patron

Hi @KanamRamu 

 

By default, new client scripts run in strict mode, which restricts access to the DOM, prototype modifications, and global window objects.

If your script needs to interact with the DOM or use prototype or window objects, you must check the isolate the script so the system can safely grant those capabilities.

 

World of Client-side Scripts: #1

Isolate Script in London

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti