Question 152 of 500
Core Application DevelopmenteasyMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is that the script uses setMandatory(), which is not available in data policies. This is because setMandatory() is a client-side method designed for client scripts and UI policies, whereas data policies execute server-side and cannot directly manipulate field attributes through JavaScript methods. On the ServiceNow Certified Application Developer CAD exam, this question tests your understanding of where server-side and client-side logic apply—a common trap is assuming all scripting methods work everywhere. Data policies enforce requirements by setting mandatory=true on a dictionary element or by using gs.addErrorMessage() to block updates, not by calling setMandatory(). A useful memory tip: think of data policies as server-side guards that check conditions before a record saves, while setMandatory() belongs to the client-side world of UI policies and client scripts.

SNOW-CAD Core Application Development Practice Question

This SNOW-CAD practice question tests your understanding of core application development. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. 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.

Exhibit

Refer to the exhibit.

Data Policy configuration on Incident table:

Name: DP - Require short description on category change
Table: Incident
Conditions: short_description IS NOT EMPTY OR category IS NOT EMPTY
Script:
if (current.operation() == 'update' && current.category.changes()) {
    current.short_description.setMandatory(true);
}

The data policy is intended to require short description when category changes during an update. However, the short description is never made mandatory. Which issue exists?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "never"

    Why it matters: Absolute qualifier. True only if the statement has zero exceptions — be cautious of options that seem obvious but break down in edge cases.

Question 1easymultiple choice
Full question →

Exhibit

Refer to the exhibit.

Data Policy configuration on Incident table:

Name: DP - Require short description on category change
Table: Incident
Conditions: short_description IS NOT EMPTY OR category IS NOT EMPTY
Script:
if (current.operation() == 'update' && current.category.changes()) {
    current.short_description.setMandatory(true);
}

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 script uses setMandatory which is not available in Data Policies

Option C is correct because `setMandatory()` is a client-side method used in client scripts or UI policies, not in data policies. Data policies run server-side and use `mandatory=true` on a dictionary element or `gs.addErrorMessage()` to enforce field requirements. Since the script attempts to call `setMandatory()` within a data policy, it will fail to make the short description mandatory, leaving the requirement unmet.

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 table is Incident but the policy uses current.operation() incorrectly

    Why it's wrong here

    Incorrect; operation() is valid.

  • The condition should use AND instead of OR

    Why it's wrong here

    Incorrect; the condition logic is not the cause of mandatory not being set.

  • The script uses setMandatory which is not available in Data Policies

    Why this is correct

    Correct; Data Policies cannot change field properties via script; they can only enforce validation or abort saves.

    Clue confirmation

    The clue word "never" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The policy should be of type 'Constraint'

    Why it's wrong here

    Incorrect; Data Policies are already constraints.

Common exam traps

Common exam trap: answer the scenario, not the keyword

ServiceNow often tests the distinction between server-side and client-side APIs, and the trap here is that candidates assume `setMandatory()` works everywhere because it is commonly used in UI policies, but it is not available in data policies.

Detailed technical explanation

How to think about this question

Data policies in ServiceNow are server-side business rules that run during database operations (insert, update, delete) and can set field attributes like mandatory, read-only, or visible by modifying the `g_form` object on the server. However, `setMandatory()` is a client-side API available only in client scripts and UI policies, which operate on the client-side `g_form` object. A common real-world scenario is when a developer mistakenly uses client-side methods in a data policy, leading to silent failures where the field never becomes mandatory despite the policy appearing to execute.

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: The script uses setMandatory which is not available in Data Policies — Option C is correct because `setMandatory()` is a client-side method used in client scripts or UI policies, not in data policies. Data policies run server-side and use `mandatory=true` on a dictionary element or `gs.addErrorMessage()` to enforce field requirements. Since the script attempts to call `setMandatory()` within a data policy, it will fail to make the short description mandatory, leaving the requirement unmet.

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: "never". Absolute qualifier. True only if the statement has zero exceptions — be cautious of options that seem obvious but break down in edge cases.

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 30, 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.