Skip to content

Instantly share code, notes, and snippets.

@icerge
Last active March 26, 2021 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icerge/faf89816d6c007fcf64ed49b9ac0e58a to your computer and use it in GitHub Desktop.
Save icerge/faf89816d6c007fcf64ed49b9ac0e58a to your computer and use it in GitHub Desktop.
Notes made from HS issues review. Collection of object misuses or interesting observations.

Global UI Scripts

It is an eval from BP perspective and HS doesn't like it either.

I found two basic mistakes in configurations.

As Source file for JS Include

You put a shared code or a 3rd party lib to UI Script and include it to a widget. Global checkbox is redundant. Any UI Script will be loaded.

As shared lib for form client side scripts

Yea, good motivation, avoid code duplication. Any shared functionality can be put to UI script and loaded in client side

:) Yes, loaded.

If it is global, it doesn't need to be loaded. But as it can be loaded, why should be global?

SN workaround

A special note about it. I came across a ServiceNow workaround implemented using a global UI script. It was related to KB0622469. The issue was resolved in London release. The knowledge article was retired. Now it is not accessible. RIP.

to be continued...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment