Job Switch Kit: Everything you need to crack your next ServiceNow interview Get Job Switch Kit →
Get the complete ServiceNow interview prep system — 500+ Q&A, mock interviews & more Get Job Switch Kit →

ServiceNow Script Include Interview Questions 2026

What is Script Include?

Script Include contains set of variables and functions which are executed on server side. It is a reusable script logic which will only execute when called by other scripts such Business Rule, script actions, client script etc.

What are the different type of Script Includes?

It is divided into below two types based on where it is being called/used :
a. Client callable Script Include: Here Client Callable checkbox is checked and it extends "AbstractAjaxProcessor" class
b. Server callable Script Include.

Based on it's structure, it can be divided into below 3 types :

1. On demand/classless Script Include: On demand Script Include in ServiceNow does not contain class (class less) and it only defines a single function. We cannot use on demand Script Include on client side.

On demand Script Include can be defined as shown below:



On demand Script Include can be called in another server side scripts as mentioned below: var demo=demoOnDemand();

2. Extend an existing class: extending of class is basically inheriting of class, means accessing the fields and methods of another class.

We can extend another Script Include in an existing class as mentioned below:



c. Define a new class: Creating a new Script Include is basically creating a new class. When we define Script Include in ServiceNow, then basic syntax gets auto populated as mentioned below:



What are private functions in Script Include and how to declare function as private?

Private function in Script Include is a function which can only be accessible/called in same or extended Script Include, it cannot be called from BR, Client Script etc.

Private functions can be defined with prefix underscore as shown below :


How to call Script Include from Server side script?

We can call Script Include in any server side script as shown below:


How to call Script Include from Client side?

It can be called from client side by using GlideAjax API. To call Script Include at client side we have to make sure that client callable checkbox in Script Include is checked and Script Include class is extending class ‘AbstractAjaxProcessor’.
Example :


How to call one function of Script Include to another function of same Script Include?

We can call internal function in the same Script Include as mentioned below:
this.functionName();

What is initialize() function in Script Include? And when it gets executed?

The initialize() function acts as constructor which can be used to set default values of variables.
This function automatically gets executed when we create object of Script Include class.

Most candidates who fail weren't underskilled.
They were underprepared.

These free questions cover the basics. But interviews go deeper. Discovery, ITOM, SecOps, Flow Designer, Now Assist, AI Agents. The Job Switch Kit gives you the full 15-day roadmap, 500+ structured Q&A across every module, a LinkedIn profile optimisation guide so recruiters find you before you even apply, and an interview bot that practices with you until you're ready. Most candidates walk in under-prepared. Don't be one of them.

500+ Q&A — Technical & Behavioral, Every Module

Battle-tested questions with structured answers across every high-frequency topic — ITOM, SecOps Vulnerability Response, Discovery, Flow Designer, AI Agents, Generative AI, and Now Assist. Plus a dedicated Behavioral round covering HR questions, STAR method answers, salary negotiation, and career direction — because technical prep alone is not enough to get the offer

15-Day Structured Roadmap

Day-by-day curriculum in the right order — scripting fundamentals, ITSM & CMDB, integrations, AI modules, and behavioral prep — so you peak exactly on interview day

Unlimited Interview Bot

Two modes: system-guided sessions with curated ServiceNow questions, and self-practice where you bring your own questions. Every session is recorded — download your Q&A transcript, review your answers, and pinpoint exactly where you need to improve

Salary Negotiation Playbook

Proven strategies for counter-offers, CTC decoding & in-hand salary strategy

Job Switch Strategy

Notice period tactics, BGV prep, resignation playbook & offer comparison

Progress Tracker + Notes

Track completion per topic, rate your confidence per question, add private notes at question level and page level. Only you see them. Always know exactly what to tackle next

LinkedIn Profile Optimisation

Step-by-step guide to rank in recruiter searches before you apply. Module-specific keyword lists, role-based headline and About section templates, experience bullet formulas, and certification display guidance built specifically for ServiceNow professionals

Get Job Switch Kit →

🔒 Secure payment via Razorpay · Instant access after payment

10 days free — for your honest review

Your story could be the reason someone else lands their next ServiceNow role

If this content made a real difference in your prep, sharing that experience with your network helps other professionals discover it — and we'd love to say thank you with 10 days of premium access, completely on us.

Real Interview Questions & Answers

Questions shared by ServiceNow professionals and reviewed for clarity, relevance, and interview usefulness.

Bushra 13 Jan 2026
What is gs.include() in script include and how we can use it ?
Mahesh 24 Feb 2026
The gs.include() method in ServiceNow is a legacy function used to load the code of one server-side Script Include into another server-side script, allowing you to access its functions and variables directly in the current scope. script inclued: function testAOP() { // function logic } testAOP.prototype = { sum: function() { var a = 10; var b = 20; var c = a b; return c; }, type: 'testAOP' }; calling script: gs.include('testAOP'); // Now you can call the function directly var total = sum();
0 helpful
0 helpful
Samrat 05 Sep 2025
How to call Application based Script include into Scoped application?
Payal Pundir 23 Sep 2025
By using name as global.scriptIncludeName
1 helpful
Tanmay 17 Dec 2025
We can call Application based Script include into Scoped application by using this : global.scriptIncludeName
0 helpful
0 helpful
Shweta 09 May 2025
Difference between client callable and server callable script include
Rama 04 Nov 2025
Whenever "Glide AJAX enabled" checkbox-enabled(checked) on Script Include form. It is called as Client Callable Script Include. Note: Enabling the "Glide AJAX enabled checkbox" doesn't restrict it from being called on server side. Whereas "Glide AJAX enabled"-disabled(unchecked) then it is server callable Script Include.
0 helpful
0 helpful
S 07 Apr 2025
Can we call a client callable script include on both server side and client side? if yes how will pass same parameter?
Tanmay 17 Dec 2025
Yes a Client-Callable Script Include can be used from both server side and client side.
0 helpful
0 helpful
Aparna Bhute 06 Jan 2025
Can you call script include in onsubmit client script with help of glide ajax method
Yashwanth 30 Jan 2025
You can, but it consists of an async function, so you can't prevent the form submission based on that async function. It's functioning is unpredictable; sometimes it completes its execution before form submission, but sometimes it doesn't. So it's better to use it onLoad.
0 helpful
0 helpful
A 24 Sep 2024
Is there any way to utilize client callable function in server side code?
Ajay 24 May 2025
No,we can't use because it is only designed to call on Client Side.
0 helpful
0 helpful
Ajit Kondekar 17 Apr 2024
can we use script include during onLoad client script?
Jim 04 May 2024
Yes, you can call script include in onLoad client script by using GlideAjax.
0 helpful
0 helpful
Atharva 10 Jan 2024
How to call script include in background script?
Namrata 10 Jan 2024
You can use below script : var scriptInludeVariable=new ScriptIncludeName(); //Replace ScriptIncludeName with your script include name scriptInludeVariable.functionName();//functionName-> One of the function name from your script include
0 helpful
Gvk 05 Aug 2025
new ScriptIncludeName().functionName();
0 helpful
0 helpful
Share a Question

🚀 Power Up Your ServiceNow Career

Join a growing community of smart ServiceNow professionals to stay ahead in interviews, sharpen your development skills, and accelerate your career.

📱

ServiceNow Buddy App

Get the free Android app for a smoother experience.

Install
Comments

No comments yet — be the first to share your thoughts!

📝 My Topic Notes 🔒 Only visible to you
Log in or sign up free to save notes
Previous Incident Management Questions Next Notification Questions

Found these questions helpful?

Share your experience — it helps other ServiceNow professionals know what to prepare.

Share Your Story →