Courseiva
Creating and customizing tables and datahardMultiple ChoiceObjective-mapped

SNOW-CAD Creating and customizing tables and data Practice Question

Exhibit

Refer to the exhibit.

Table: u_incident_task
Fields:
  u_incident: reference to incident
  u_task_type: choice (Investigation, Resolution, Documentation)
  u_assigned_to: reference to sys_user
  u_state: choice (Open, In Progress, Closed)

Client script: onChange on u_task_type
Script:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (isLoading || newValue == '') {
        return;
    }
    var ga = new GlideAjax('TaskTypeAjax');
    ga.addParam('sysparm_name', 'getDefaultAssignedTo');
    ga.addParam('sysparm_task_type', newValue);
    ga.getXMLAnswer(function(answer) {
        if (answer) {
            g_form.setValue('u_assigned_to', answer);
        }
    });
}

A developer implemented the client script shown in the exhibit to auto-populate the assigned-to field based on the task type. However, when the task type is changed, the assigned-to field is not updated. The server-side script 'TaskTypeAjax' is correctly defined and returns a valid sys_id. What is the most likely reason for the failure?

⚠ Common exam trap

Candidates often assume any Script Include can be called from a client script, but ServiceNow enforces an explicit 'Client callable' flag to control access from the browser.

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 Include 'TaskTypeAjax' is not client-callable

The client script attempts to call a Script Include named 'TaskTypeAjax' from the client side. By default, Script Includes are not accessible from client scripts unless the 'Client callable' checkbox is enabled in the Script Include record. Since the script is failing to update the assigned-to field, the most likely cause is that 'TaskTypeAjax' is not marked as client-callable, preventing the GlideAjax request from executing successfully.

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 client script does not check if oldValue is different from newValue

    Why it's wrong here

    It doesn't check, but that wouldn't prevent execution.

  • The Script Include 'TaskTypeAjax' is not client-callable

    Why this is correct

    It must be marked as client-callable in its definition.

  • The client script returns on isLoading, preventing execution

    Why it's wrong here

    It returns during loading, but onChange triggers after loading.

  • A UI policy is overriding the assigned-to field

    Why it's wrong here

    UI policies run client-side but wouldn't prevent the setValue.

About these practice questions

One of 481 original SNOW-CAD practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.