GlideAjax
GlideAjax is the client-side API for calling a Client Callable Script Include asynchronously, so a form can fetch server data without a page reload.
Also searched as: GlideAjax example, client callable script include.
In practice
The Script Include must extend AbstractAjaxProcessor and have Client callable checked, and only the methods you expose are reachable. Always use getXMLAnswer or getXML with a callback; getXMLWait blocks the browser and is a red flag in interviews.
Example
An onChange client script asks the server for the selected user's manager and populates a field from the callback.
var ga = new GlideAjax('UserUtils');
ga.addParam('sysparm_name', 'getManager');
ga.addParam('sysparm_user', g_form.getValue('caller_id'));
ga.getXMLAnswer(function (answer) {
g_form.setValue('u_manager', answer);
});What interviewers check
The follow-up is always 'why not synchronous?' plus what makes a Script Include client callable.
Practise this topic
Related Automation terms
- Business RuleA Business Rule is server-side script that runs when a record is queried, inserted, updated or deleted, timed as before, after, async or display.
- GlideRecordGlideRecord is the server-side ServiceNow API for querying, inserting, updating and deleting records, walking results row by row through query() and next().
- Flow DesignerFlow Designer is ServiceNow's low-code automation builder where a trigger plus a sequence of reusable actions replaces the legacy Workflow Editor.