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

Scheduled script execution


Using the scheduled script execution feature, we can execute a server-side code on a recurring schedule. This is useful for many scenarios, such as updating multiple records, purging old records based on criteria, or parsing or validating large datasets.

As a part of our Travel Booking Application, we will create a scheduled script to automatically close booking requests, where the state is pending (-5) and the travel start date is past the current date. In essence, we will mark the state field as Closed Incomplete, which corresponds to the value of 4.

Note

You can view, add, or remove choices for any drop-down field using Dictionary entry, Form Designer, or Update Choice List.

To define a new script that executes on a recurring schedule, use the following steps:

  1. Open Studio, select Server Development | Scheduled Script Execution as shown in the following screenshot, in the Create Application File wizard, and click on Create:
  1. In the subsequent form that opens up (shown...