O'Reilly logo

Mastering ServiceNow by Martin Wood

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using GlideRecord (and its friends)

Chapter 1, ServiceNow Foundations, shows that ServiceNow is built around data. Background Scripts, and scripts in general, can use the excellent database connectivity capabilities built in ServiceNow to easily access whatever information we want. GlideRecord is instrumental in doing this.

GlideRecord is a class that represents a single entry in a database table. It is easy to use, but I recommend reviewing the basics from wiki or from a scripting course. There are some gotchas and some very interesting features that are misunderstood.

Tip

For full details, investigate the documentation at http://wiki.servicenow.com/?title=GlideRecord.

Let's run some code in Background Scripts to allow us to understand how it works. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required