Now we will look at some of the server-side classes that we can use for our scripts. Remember these methods will not work on the client side so make sure you are aware whether the script you are writing is on the server side.
Server-side Glide classes
GlideSystem
GlideSystem is probably the most commonly used server-side classes. Let's have a look at how we can utilize this class to aid us in our scripting.
ServiceNow shortens GlideSystem to gs in scripts so the methods of GlideSystem will be prefixed with gs.
Let's start by seeing how to get a user's sys_id using GlideSystem:
var userID = gs.getUserID();
This puts the logged-in user's sys_id in the userID variable. This can be helpful as you can use this...