ServiceNow Script Include Patterns: Classless, Class-Based and Client-Callable
The main ServiceNow Script Include patterns: classless on-demand functions, class-based utilities, extended classes and client-callable GlideAjax classes.
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
The main ServiceNow Script Include patterns: classless on-demand functions, class-based utilities, extended classes and client-callable GlideAjax classes.
Read guideUI policy vs client script vs data policy in ServiceNow: what each one does, where it runs, and a simple rule for choosing the right one for a field.
Read guideBuild ServiceNow HR onboarding and offboarding with lifecycle events: HR services, activity sets, trigger types, and checks that keep journeys on time.
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?