what is GlideAjax ?How to write Ajax function?

Lets start first try to understand what is AJAX in general before we jump in ServiceNow GlideAjax .

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

Continue reading →

Understand Callback function in ServiceNow

In ServiceNow, there is always a need to return GlideRecord on the client side for a specific field  due several reason. for example , checking whether the caller is VIP or no? or to check if the customer has a parent company, and many other reasons depend on the business needs.

Many ServiceNow developers when they do write a script for returning GlideRecord on the client side they do it without a call back function that makes the script runs synchronously causing a hang, while waiting response back from the server.

Continue reading →