SNOW-CAD Core Application Development Practice Question
A developer creates a script include with client-callable true. The script include is used in a client script to validate a field. However, when the client script runs, it throws an error that GlideAjax is not defined. What is the most likely issue?
⚠ Common exam trap
ServiceNow often tests the misconception that client-callable script includes in the global scope are accessible from any client script, ignoring that client scripts in scoped applications cannot directly use GlideAjax from the global scope.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The client script is running in a UI policy instead of a client script.
The error 'GlideAjax is not defined' occurs when GlideAjax is used in a context that does not support it, such as a UI policy script. UI policies run on the server side and do not have access to client-side APIs like GlideAjax. Even though the script include is marked client-callable, the client script itself must be a true client script (e.g., onChange, onLoad) to use GlideAjax. Option B correctly identifies this scenario: the developer may have accidentally placed the script in a UI policy instead of a client script.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The script include is not marked as 'Client-callable'.
Why it's wrong here
Incorrect. The script include is marked as client-callable, so this is not the cause of the error.
- ✓
The client script is running in a UI policy instead of a client script.
Why this is correct
Correct. UI policies do not support GlideAjax, causing 'GlideAjax is not defined' if the script is placed there instead of in a client script.
- ✗
The script include is a global scope but the client script is in a scoped application.
Why it's wrong here
Incorrect. GlideAjax is available in scoped applications; scope isolation does not cause this error.
- ✗
The client script is not using the correct GlideAjax syntax.
Why it's wrong here
Incorrect. Syntax errors typically produce different messages (e.g., 'GlideAjax is not a function'), not 'GlideAjax is not defined'.
Go deeper
Related to this question
About these practice questions
This SNOW-CAD question is part of Courseiva's 481-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SNOW-CAD practice question is part of Courseiva's free ServiceNow certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SNOW-CAD exam.