Server-side Glide API
The server-side Glide API exposes many Java classes and methods on the server that can be used to extend the feature of the platform by exposing access to system resources and the database. Let us quickly go through different server-side APIs available in ServiceNow. Like the client-side API, we will be using these server-side APIs in the upcoming chapters.
GlideRecord
GlideRecord
is a special Java class exposed to enable developers to perform database operations by writing simple JavaScript code that executes on the server side. The GlideRecord
class can be used to perform insert, update, delete, or query operations on the database. It can also be used to perform complex join queries, bulk delete, and update.
To create a GlideRecord
object, we must specify the table we want to retrieve the data from. In the following example, passing the name of the table in the constructor of the object will create a GlideRecord
object for the incident
table:
var gr = new GlideRecord...