SNOW-CAD Core Application Development Practice Question
An administrator sees that a client script on a catalog item is not firing. The script is defined in the catalog item's 'Variable Editor' as a 'onSubmit' script. Which is the most likely reason?
⚠ Common exam trap
Test-takers frequently confuse the scope of variable-level scripts (defined in the Variable Editor) with item-level Catalog Client Scripts, assuming any script placed in the Variable Editor will run globally for the catalog item.
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 script is written as a 'Catalog Client Script' but is defined in the 'Variable Editor' of the variable
The scenario describes a script defined in the catalog item's 'Variable Editor' as an 'onSubmit' script, which is a variable-level script. However, the question states the script is not firing. The most likely reason is that the script was written as a 'Catalog Client Script' (a global script type) but was incorrectly placed in the 'Variable Editor' of a variable. Variable-level scripts in the Variable Editor are executed only when that specific variable is present on the form; if the script is actually a Catalog Client Script (which runs on the entire catalog item), it would not execute as expected because it is scoped to the variable, not the item. This mismatch between the intended script type and its location causes the script to fail to fire.
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 is set to run on 'onLoad', but the page is being cached
Why it's wrong here
Incorrect; client scripts run even if the page is cached because they execute in the browser.
- ✗
The script is defined on a variable, but the variable is not on the order form
Why it's wrong here
Incorrect; if the variable is not on the form, its client script still runs but may not have any effect.
- ✓
The script is written as a 'Catalog Client Script' but is defined in the 'Variable Editor' of the variable
Why this is correct
Correct; client scripts for catalog items must be defined in the Catalog Client Scripts related list, not inside a variable definition.
- ✗
The script uses 'g_form' but the form is not loaded yet
Why it's wrong here
Incorrect; g_form is available after the form loads, so onLoad and onSubmit scripts have access to it.
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.