Book Image

ServiceNow: Building Powerful Workflows

By : Tim Woodruff, Martin Wood, Ashish Rudra Srivastava
Book Image

ServiceNow: Building Powerful Workflows

By: Tim Woodruff, Martin Wood, Ashish Rudra Srivastava

Overview of this book

ServiceNow is a SaaS application that provides workflow form-based applications. It is an ideal platform for creating enterprise-level applications, giving requesters and fulfillers improved visibility and access to a process. ServiceNow-based applications often replace email by providing a better way to get work done. This course will show you how to put important ServiceNow features to work in the real world. We will introduce key concepts and examples on managing and automating IT services, and help you build a solid foundation towards this new approach. You will then learn more about the power of tasks, events, and notifications. We’ll then focus on using web services and other mechanisms to integrate ServiceNow with other systems. Further on, you’ll learn how to secure applications and data, and understand how ServiceNow performs logging and error reporting. At the end of this course, you will acquire immediately applicable skills to rectify everyday problems encountered on the ServiceNow platform. The course provides you with highly practical content explaining ServiceNow from the following Packt books: 1. Learning ServiceNow 2. ServiceNow Cookbook 3. Mastering ServiceNow, Second Edition
Table of Contents (39 chapters)
Title Page
Credits
Preface
Free Chapter
1
Module 1
36
Bibliography

Chapter 12. Server-side Scripting

Server-side scripting in ServiceNow might seem easier than client-side scripting, because you don't have to worry about AJAX, asynchronysity, or large performance impacts for seemingly optimized queries. However, due to the expanded and adjusted functionality of server-side JavaScript, there are a few additional pitfalls to be mindful of.

Scripts that run on the server provide a great deal of power and control to the developer that's equipped to use them properly; however, they can also put great strain on the server if used improperly. Infinite loops and a great deal of in server-side scripts can be far more difficult to resolve than client-side issues. It's best to always be mindful of this fact when writing server-side scripts, and test your code thoroughly.

One way to test your server-side code is by using background scripts. This provides a script window that allows you to execute server-side scripts, similar to the client-side JavaScript executor. If...