Home Blogs Understand The Mystery Of GlidAjax

Understand The Mystery Of GlidAjax

Let’s start first try to understand what AJAX in is general before we jump in ServiceNow Glide Ajax.

AJAX term is stand for Asynchronous JavaScript and XML. AJAX allows us to update part of our web page asynchronously by exchanging small amounts of data with the server, that’s exchange occurs behind the scene instead of reloading the whole form.

Source http://www.w3schools.com/php/php_ajax_intro.asp

The GlideAjax allows you to trigger server-side code from the client side. the main benefit of GlideAjax that you can easily calls pass parameters to the script includes and using naming conventions, allows the use of these parameters.

Let’s take an example: as you properly know that in ServiceNow, the relation between Company and Location is many to many. Let’s say that you would like to do the following:


– when a user selects a company, the location field should be populated with first retrieved location





In order to do that, you need in the beginning to create new script include and the do the following:

  1. Set Client callable to true.
  2. Set the name field to be exactly the same as the class name.
  3. Let’s write the in the script, code like below.