ServiceNow GlideAjax: Call a Script Include from a Client Script
How to use GlideAjax in ServiceNow to call a client-callable Script Include from a client script, return JSON, and keep the call fast and secure.
Read guidePractical guides, useful scripts, and lessons from working with the platform. A little less figuring it out. A little more getting it done.
A targeted query is a good place to start.
// Only the records you need
var incidents = new GlideRecord('incident');
incidents.addQuery('active', true);
incidents.setLimit(10);
incidents.query();Read the query performance guide 
The notebook
How to use GlideAjax in ServiceNow to call a client-callable Script Include from a client script, return JSON, and keep the call fast and secure.
Read guideHow to set up ServiceNow intelligent incident routing with assignment rules, assignment data lookups and Predictive Intelligence, and how to measure it.
Read guideServiceNow client script best practices for onLoad, onChange and onSubmit: when to use each type, how to avoid slow forms, and safe GlideAjax patterns.
Read guideThe script library
75 ServiceNow examples across client scripts, business rules, integrations, and more. Find a pattern, understand it, and adapt it to your instance.
Open the script libraryHave a ServiceNow question or a project in mind?