Book Image

ServiceNow Application Development

By : Sagar Gupta
Book Image

ServiceNow Application Development

By: Sagar Gupta

Overview of this book

ServiceNow provides service management for every department in the enterprise, including IT, Human Resources, Facilities, Field Service, and more. This book focuses on all the steps required to develop apps and workflows for any of your business requirements using ServiceNow. You will start with the first module, which covers the basics of ServiceNow and how applications are structured; how you can customize the dashboard as required; and also how to create users. After you get used to the dashboard, you will move on to the next module, Applications and Tables, where you will learn about working with different tables and how you can create a scope other than the global scope for your application. The next module is Scripting and APIs, where you will learn Scripting in ServiceNow and use powerful APIs to develop applications. The final module, Administration Essentials, covers debugging, advanced database features, and scheduled script creation. By the end of the book you will have mastered creating organized and customer-friendly applications
Table of Contents (21 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Free Chapter
1
Introduction to ServiceNow

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...