ServiceNow provides developers with some exposed JavaScript APIs to aid them with the scripts they write. This saves a lot of time in accessing records and fields in scripts in ServiceNow. There are a number of different classes and objects available to developers, some of which very helpful and others rarely used.
Using ServiceNow exposed JavaScript APIs
GlideRecord
One of the most common JavaScript APIs is the GlideRecord class, which is extremely handy and will fast become a staple of most scripting. GlideRecord is a way of finding and counting records in ServiceNow based on many different queries. It is quite similar to a SQL statement if that is something you are familiar with.
Let's have a look at how to use GlideRecord...