← Home
🔥0 DAY
0 XP

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