Client script error (Isolate script)

MuthupreetP
Tera Contributor

While I am creating new application, I found some error in client script.I have unchecked ISOLATE SCRIPT in client script and creating property for 'glide.script.block.client.globals' too.

How Can I find the way t

MuthupreetP_0-1745940263103.png

 

o clear the error? Anyone may help with this.

1 REPLY 1

tiagomacul
Giga Sage

To help me figure out what's going wrong with your Client Script while you're building your new application, let's try a few things to diagnose the issue:

 

  1. What's the exact error message you're seeing? If there's a specific error message, please share it, as it can often give us a big clue.
  2. Which specific Client Script is throwing this error? Could you tell me the name of the Client Script and the table it's running on?
  3. What does the Client Script code look like? If you can share the code (or just the relevant parts), I can take a look for any potential issues in the logic.
  4. What user actions are you taking that lead to this error? Describing the steps to reproduce the error is really helpful.
  5. Are you seeing any errors in your browser's console? (You can usually open this by pressing F12 in your browser and checking the 'Console' tab). Client-side script errors often show up there.
  6. What exactly are you trying to achieve with this Client Script? Understanding the goal of the script can help determine if the approach is correct.
  7. Have you made any recent changes to other Client Scripts or Business Rules that might be related to this table or these fields? Sometimes, issues in other scripts can affect a Client Script's behavior.

 

Regarding what you've already tried:

  • Unchecking 'ISOLATE SCRIPT': This allows the script to access global variables, but it can introduce risks if not used carefully. Understanding why you unchecked this might be useful.
  • Creating the 'glide.script.block.client.globals' property: This property controls access to global variables in Client Scripts. Knowing what value you set for it could be relevant.

 

https://www.servicenow.com/community/developer-blog/isolate-script-in-london/ba-p/2275821

https://www.servicenow.com/community/developer-blog/world-of-client-side-scripts-1/ba-p/2772755