Courseiva
Application development using ServiceNow StudiohardMultiple ChoiceObjective-mapped

SNOW-CAD Practice Question: Application development using ServiceNow Studio

Exhibit

Refer to the exhibit.

```javascript
var MyAjaxProcessor = Class.create();
MyAjaxProcessor.prototype = Object.extendsObject(AbstractAjaxProcessor, {
    getData: function() {
        var gr = new GlideRecord('incident');
        gr.addQuery('active', true);
        gr.query();
        var result = [];
        while(gr.next()) {
            result.push(gr.getUniqueValue());
        }
        return JSON.stringify(result);
    }
});
```

Refer to the exhibit. A developer created this Script Include for use in a Service Portal widget. When calling the processor from a client script, the developer passes no 'sysparm_name' parameter. What will be the result?

⚠ Common exam trap

Test-takers frequently assume a default method (like getData) runs when no method is specified, but ServiceNow's processor architecture requires an explicit 'sysparm_name' to invoke any method beyond the constructor.

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 will execute the processor's constructor only.

When a Script Include is invoked from a Service Portal widget via a processor, the processor's constructor runs automatically. If no 'sysparm_name' parameter is passed, the processor does not know which method to call, so only the constructor executes. The constructor typically initializes properties but does not return data, resulting in no output.

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 will return an empty array.

    Why it's wrong here

    Wrong: getData is not called, so no array is returned; the response is empty.

  • The script will execute the processor's constructor only.

    Why this is correct

    Correct: without sysparm_name, only the constructor runs; no method is executed.

  • The script will throw an error because the method is not allowed.

    Why it's wrong here

    Wrong: without sysparm_name, the processor does not throw an error; it just doesn't execute any method.

  • The script will run the getData method by default.

    Why it's wrong here

    Wrong: there is no default method; sysparm_name is required to specify which method to call.

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 →

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.