News, Updates, & Resources
How can we allow a watchlist user to view a RITM?
We can do that using the ACL script bellow: var u = gs.getUserID(); answer =...
How to perform a dynamic contains (me) search on a Watchlist?
The answer is simple: // use that code : javascript:gs.getUserID()
linebreak info message in ServiceNow
I had a requirement of implementing a line break in an info message. I have tried many methods :...
How to return multiple values to a client script via Glide Ajax?
Server Side script: var MyScriptInclude = Class.create(); MyScriptInclude.prototype =...
What does [object Object] mean?
This is the default serialisation of an object. But why is it [object Object] and not...
Check if a string contains a substring in JavaScript
This first a most simple way to that is using the include function: var returnde = "Hello";...
How to call a script include from a server-side and a client-side script?
Type 1 : a function script include function typeOne() { gs.log('This is my first example'); } Type...
Best Practices while scripting
1 - Never name a GlideRecord object by gr. Instead, you can be more specific on the name that you...
Best Practice: Creating system properties
One of the more advised best practices, of scripting in ServiceNow, is to not hardcode the sys_id....