Courseiva
Designing interfaces and user experienceshardMultiple ChoiceObjective-mapped

SNOW-CAD Designing interfaces and user experiences Practice Question

A ServiceNow developer is building a custom service portal widget that displays a list of open incidents for the current user. The widget includes a button to reassign an incident to a selected group. The developer writes a client controller function that calls $http.post to a scripted REST API endpoint. However, when the button is clicked in production, the console shows 'unexpected token <'. The developer confirms the endpoint does not exist. What is the best course of action?

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

Create a script include with the reassign logic, and call it from the widget server-side script using a client callable action.

Using a script include with a server-side script and widget server-side script is the recommended pattern for server-side logic. It avoids direct REST calls and follows ServiceNow best practices.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Change the button to a direct link to a different page.

    Why it's wrong here

    This does not solve the requirement for inline reassignment.

  • Create a script include with the reassign logic, and call it from the widget server-side script using a client callable action.

    Why this is correct

    This uses the proper ServiceNow architecture: server-side logic via Script Include, exposed via server script, and invoked via client callable.

  • Move the entire reassign logic to a client-side script using GlideRecord via Ajax.

    Why it's wrong here

    Client-side GlideRecord is deprecated and insecure.

  • Use a custom UI macro instead of a widget.

    Why it's wrong here

    UI macros are not designed for complex interactions like server-side logic.

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.