SNOW-CAD User Interface Development Practice Question
A company has a Service Portal that includes a custom widget for submitting hardware requests. The widget has a client controller that calls a server script to create a new record in the 'hardware_request' table. Recently, users have reported that when they click the 'Submit' button, the widget sometimes does not show a success message, and the record is not created. The developer reviews the server script, which uses gs.log to log errors, and sees no errors in the logs. The client controller uses $scope.server.get() to call the server. The widget template uses ng-show='data.success' to display a success message. Based on this scenario, what is the most likely cause of the intermittent issue?
⚠ Common exam trap
ServiceNow often tests the misconception that server-side errors are the only cause of missing success messages, but the trap here is that asynchronous client-side handling (promise resolution and digest cycles) can silently fail to update the UI even when the server executes correctly.
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 does not handle the asynchronous response properly; the success message depends on the promise resolving before the user might navigate away or click again.
The client controller uses $scope.server.get() to make an asynchronous call to the server script. If the user clicks 'Submit' and then navigates away or clicks again before the promise resolves, the success message (ng-show='data.success') may never display because the $scope.data object is not updated in time. The server script logs no errors because it executes correctly, but the client-side asynchronous handling fails to capture the response, leading to the intermittent issue.
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 server script fails due to a mandatory field not being provided, but the error is not logged.
Why it's wrong here
The developer checked logs and saw no errors.
- ✗
The server script uses data.success = true; but the client controller does not read it.
Why it's wrong here
The client controller receives data from the server.
- ✗
The widget has a Client Script that conflicts with the server script.
Why it's wrong here
Client Scripts are not used in Service Portal widgets.
- ✓
The client controller does not handle the asynchronous response properly; the success message depends on the promise resolving before the user might navigate away or click again.
Why this is correct
Asynchronous calls require proper handling of promises to update scope.
Visual reference
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.