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

KanamRamu
Giga 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

 

3 REPLIES 3

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?