Question 10 of 500
Core Application DevelopmenthardMultiple SelectObjective-mapped

Quick Answer

The correct answer is that `gr.get()` and `gr.next()` are both valid ways to retrieve a single record from a GlideRecord query on the task table. `gr.get(sys_id)` directly fetches a record by its unique identifier without needing a prior query, returning true if found, while `gr.next()` advances the cursor to the first record after a `query()` and returns true if a record exists, making it the standard method to access a single record from a result set. On the ServiceNow Certified Application Developer CAD exam, this tests your understanding of GlideRecord iteration versus direct lookup—a common trap is confusing `get()` with `hasNext()`, which only checks existence without retrieving data. Remember that `get()` is for direct access by sys_id, while `next()` is for stepping through query results; a useful memory tip is “Get by ID, Next by query.”

SNOW-CAD Core Application Development Practice Question

This SNOW-CAD practice question tests your understanding of core application development. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. 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.

Which TWO of the following are valid ways to retrieve a single record from a GlideRecord query on the task table?

Question 1hardmulti select
Full question →

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()

Option A is correct because `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.

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.

  • gr.next()

    Why this is correct

    Correct: Used to iterate through results; when called once, it retrieves the first record.

    Related concept

    Read the scenario before looking for a memorised answer.

  • 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.

    Related concept

    Read the scenario before looking for a memorised answer.

  • gr.getByID()

    Why it's wrong here

    Incorrect: getByID() is not a valid GlideRecord method.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often 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)`.

Detailed technical explanation

How to think about this question

Under the hood, `gr.next()` uses the database cursor to fetch the next row from the result set, populating the GlideRecord object's fields; it is essential for iterating through multiple records but also works for a single record. The `get()` method performs a direct database lookup by sys_id (or other unique key if specified), which is more efficient than querying and calling `next()` when you already know the sys_id. A subtle behavior is that `get()` can also accept a single argument that is not a sys_id if the table has a different unique key defined, but by default it uses sys_id.

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.

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.

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?

Core Application Development — This question tests Core Application Development — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: gr.next() — Option A is correct because `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.

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.

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 →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 25, 2026

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.

Loading comments…

Sign in to join the discussion.

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.