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

Client-side Glide API


The client-side Glide API exposes many different methods that can be used to customize the UI, access user sessions, and perform AJAX. Let us quickly go through the different client-side classes available in ServiceNow. We will be using these APIs in the upcoming chapters.

GlideForm

The GlideForm JavaScript class consists of methods that can be used to customize forms and modify form data. There is no need to explicitly create an object of the GlideForm class. Instead, the g_form variable is a global object and is available and accessible from all client-side scripts.

The following are some examples of GlideForm:

  • The void setReadOnly method of the GlideForm object can be used to make a form field read only. It accepts two parameters - fieldname and the boolean read only property:
        g_form.setReadOnly("fieldName",true) 
  • The void setValue method of the GlideForm object can be used to change the value of a Form field:
        g_form.setValue(fieldname, value) 

GlideUser

The...