SNOW-CAD Core Application Development Practice Question
Which TWO of the following are valid ways to retrieve a single record from a GlideRecord query on the task table?
⚠ Common exam trap
A common mix-up: candidates confuse `getUniqueValue()` with retrieving the record itself, or mistakenly think `getByID()` is a valid method because of its similarity to `get()` or `getByID()` in other platforms, while ServiceNow strictly uses `get(sys_id)`.
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
✓
gr.next()
`gr.next()` is the standard method to advance the cursor to the next record in a GlideRecord query result set. When called after a `query()`, it retrieves the first record (or subsequent records) and returns true if a record exists, making it a valid way to access a single record. Option D is correct because `gr.get(sys_id)` retrieves a single record by its sys_id directly, without needing a prior query, and returns true if the record is found.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
gr.next()
Why this is correct
Correct: Used to iterate through results; when called once, it retrieves the first record.
- ✗
gr.getRow()
Why it's wrong here
Incorrect: getRow() is not a valid GlideRecord method.
- ✗
gr.getUniqueValue()
Why it's wrong here
Incorrect: getUniqueValue() returns a field value, not a record.
- ✓
gr.get()
Why this is correct
Correct: Gets a record by sys_id or query condition.
- ✗
gr.getByID()
Why it's wrong here
Incorrect: getByID() is not a valid GlideRecord method.
Go deeper
Related to this question
About these practice questions
Courseiva writes every SNOW-CAD question from scratch — 481 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.