- A
The 'serial_number' field in the 'alm_asset' table does not exist or is misspelled
Why wrong: A missing field would cause an error when trying to set a value, not during get().
- B
The GlideRecord.get() method is incorrectly used; it should be gr.get('serial_number') without the value
Why wrong: The correct syntax is gr.get('field', value); this is valid.
- C
The request body is not being parsed; 'request.body' is null because the content type is not set to JSON or the API is not expecting a body
If the API does not parse the body, request.body remains null, causing a NullPointerException when accessing .serial.
- D
The external system is sending the serial number as part of the URL instead of the request body
Why wrong: That would cause request.body to be empty, but the error would be different (e.g., undefined).
Quick Answer
The answer is that the NullPointerException occurs because `request.body` is null, meaning the request body was never parsed into a JavaScript object. In ServiceNow Scripted REST APIs, the `request.body` property only contains data when the incoming request includes a proper `Content-Type` header—typically `application/json`—and the API is configured to accept a body. Without this, `request.body` remains null, and attempting to access `request.body.serial` throws the error. On the ServiceNow Certified Application Developer CAD exam, this scenario tests your understanding of REST API request handling and common pitfalls with null objects. A frequent trap is assuming the body is automatically parsed; in reality, the integration must set the correct content type, or the developer must manually parse the body using `request.body.data` or `request.body.dataString`. Remember the mnemonic: "No type, no parse—null body, no class."
SNOW-CAD Platform Features and Integration Practice Question
This SNOW-CAD practice question tests your understanding of platform features and integration. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
A company uses ServiceNow to manage IT assets. An integration sends asset data from an external CMDB to ServiceNow via REST API. The external system sends a payload that includes the asset's serial number, location, and status. The developer has created a Scripted REST API to receive this data. However, when testing, the external system receives an HTTP 500 error. The developer inspects the script log and sees the error: 'java.lang.NullPointerException' at line 10 of the script. The script uses the GlideRecord API to query for an existing asset by serial number. The relevant code is: var gr = new GlideRecord('alm_asset'); gr.get('serial_number', request.body.serial); What is the most likely cause of the NullPointerException?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue:
"most likely"Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
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 request body is not being parsed; 'request.body' is null because the content type is not set to JSON or the API is not expecting a body
Option C is correct because the NullPointerException occurs when trying to access a property of a null object. In this case, `request.body` is null, meaning the request body was not parsed into a JavaScript object. This typically happens when the Content-Type header is not set to `application/json` or the Scripted REST API endpoint is not configured to expect a request body, so `request.body.serial` evaluates to `null.serial`, causing the exception.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
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 'serial_number' field in the 'alm_asset' table does not exist or is misspelled
Why it's wrong here
A missing field would cause an error when trying to set a value, not during get().
- ✗
The GlideRecord.get() method is incorrectly used; it should be gr.get('serial_number') without the value
Why it's wrong here
The correct syntax is gr.get('field', value); this is valid.
- ✓
The request body is not being parsed; 'request.body' is null because the content type is not set to JSON or the API is not expecting a body
Why this is correct
If the API does not parse the body, request.body remains null, causing a NullPointerException when accessing .serial.
Clue confirmation
The clue word "most likely" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
The external system is sending the serial number as part of the URL instead of the request body
Why it's wrong here
That would cause request.body to be empty, but the error would be different (e.g., undefined).
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates often assume the NullPointerException is due to a field name typo or incorrect GlideRecord usage, but the real issue is that `request.body` is null because the request body was not parsed, which is a subtle but critical detail about REST API request handling in ServiceNow.
Detailed technical explanation
How to think about this question
Under the hood, the Scripted REST API in ServiceNow uses a `request` object that is populated based on the request's Content-Type. If the Content-Type is `application/json`, the body is automatically parsed into `request.body` as a JavaScript object. If the Content-Type is missing or incorrect (e.g., `text/plain`), `request.body` remains null. This is a common integration pitfall where the external system sends JSON but omits the proper Content-Type header, or the REST endpoint is defined without a body parameter.
KKey Concepts to Remember
- Read the scenario before looking for a memorised answer.
- Find the constraint that changes the correct option.
- Eliminate answers that are true in general but not in this case.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A practitioner preparing for the SNOW-CAD exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
- →
Platform Features and Integration — study guide chapter
Learn the concepts, then practise the questions
- →
Platform Features and Integration practice questions
Targeted practice on this topic area only
- →
All SNOW-CAD questions
500 questions across all exam domains
- →
ServiceNow Certified Application Developer CAD study guide
Full concept coverage aligned to exam objectives
- →
SNOW-CAD practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related SNOW-CAD practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Working with Data practice questions
Practise SNOW-CAD questions linked to Working with Data.
Platform Features and Integration practice questions
Practise SNOW-CAD questions linked to Platform Features and Integration.
Integrating and managing application data practice questions
Practise SNOW-CAD questions linked to Integrating and managing application data.
Automating application logic with business rules and scripts practice questions
Practise SNOW-CAD questions linked to Automating application logic with business rules and scripts.
Application development using ServiceNow Studio practice questions
Practise SNOW-CAD questions linked to Application development using ServiceNow Studio.
Creating and customizing tables and data practice questions
Practise SNOW-CAD questions linked to Creating and customizing tables and data.
Designing interfaces and user experiences practice questions
Practise SNOW-CAD questions linked to Designing interfaces and user experiences.
Core Application Development practice questions
Practise SNOW-CAD questions linked to Core Application Development.
User Interface Development practice questions
Practise SNOW-CAD questions linked to User Interface Development.
SNOW-CAD fundamentals practice questions
Practise SNOW-CAD questions linked to SNOW-CAD fundamentals.
SNOW-CAD scenario practice questions
Practise SNOW-CAD questions linked to SNOW-CAD scenario.
SNOW-CAD troubleshooting practice questions
Practise SNOW-CAD questions linked to SNOW-CAD troubleshooting.
Practice this exam
Start a free SNOW-CAD practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this SNOW-CAD question test?
Platform Features and Integration — This question tests Platform Features and Integration — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: The request body is not being parsed; 'request.body' is null because the content type is not set to JSON or the API is not expecting a body — Option C is correct because the NullPointerException occurs when trying to access a property of a null object. In this case, `request.body` is null, meaning the request body was not parsed into a JavaScript object. This typically happens when the Content-Type header is not set to `application/json` or the Scripted REST API endpoint is not configured to expect a request body, so `request.body.serial` evaluates to `null.serial`, causing the exception.
What should I do if I get this SNOW-CAD question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Are there clue words in this question I should notice?
Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 25, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.