Summary
Since ServiceNow is a very data-oriented platform, GlideRecord
plays a critical role. This chapter explored how each field is represented by a GlideElement
object and what that means for dates and other areas of interest. GlideAggregate
uses the database to perform calculations and so can perform much faster than alternative methods.
Business Rules are the home of scripting in ServiceNow. Since every item in ServiceNow is a database record and Business Rules allow you to alter queries and change the record itself, you get enormous power at your fingertips. We ran through several scenarios, including working with dates, validating data, and ensuring data integrity.
Script Includes are the perfect place to store commonly used code. By defining classes, you can create your own data structures, enabling you to extend ServiceNow in any way you require. The wide variety of Script Includes available out of the box should give you inspiration, but the background of each pattern and how it...