Courseiva
User Interface DevelopmenthardMultiple ChoiceObjective-mapped

SNOW-CAD User Interface Development Practice Question

A Service Portal widget is not updating data on the page after the user clicks a button that calls a server-side function. The client controller uses $scope.server.get() to call the server. The server script updates a global variable in glideRecord and returns it. However, the widget view does not reflect the change. What is the most likely issue?

⚠ Common exam trap

ServiceNow often tests the asynchronous nature of `$scope.server.get()` and `$scope.server.post()`, trapping candidates who assume the server call is synchronous or that the scope update happens automatically without handling the promise.

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 controller is not handling the promise returned by $scope.server.get(); the scope update should be inside the success callback.

`$scope.server.get()` returns a promise, and the scope variables must be updated inside the `.then()` success callback to ensure the changes are applied after the asynchronous server response is received. Without handling the promise, the client controller executes the next line immediately, and the scope update happens before the server data is available, so the widget view never reflects the change.

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 widget template is not bound to the correct scope variable.

    Why it's wrong here

    Binding issues could occur, but the primary issue is missing promise handling.

  • The client controller should use $scope.server.update() instead of $scope.server.get().

    Why it's wrong here

    $scope.server.update() is not a valid method.

  • The client controller is not handling the promise returned by $scope.server.get(); the scope update should be inside the success callback.

    Why this is correct

    The async call returns a promise; scope must be updated after resolution.

  • The server script is not allowed to modify data from a widget server script.

    Why it's wrong here

    Widget server scripts can modify data.

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.