Courseiva
Core Application DevelopmenthardMultiple ChoiceObjective-mapped

SNOW-CAD Core Application Development Practice Question

Exhibit

Refer to the exhibit.

(function executeRule(current, previous /*null when async*/) {
    if (current.state == 'closed') {
        current.setAbortAction(true);
    }
})(current, previous);

A developer implements the above Business Rule on the 'incident' table. What is the effect of this script?

⚠ Common exam trap

The trap here is that candidates may misinterpret the condition as preventing the state from being set to closed, when in fact it only blocks updates to records that are already closed, not the transition to closed itself.

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

Aborts the update if the record is already in closed state

The Business Rule uses 'current.operation() == 'update'' and checks if the state is 'closed' before the update. If the record is already closed, it calls 'gs.addErrorMessage()' and returns false, which aborts the update. This prevents any changes to a closed record, not just preventing the state from being set to closed.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Deletes the record if the state is closed

    Why it's wrong here

    setAbortAction does not delete records; it only prevents the current operation.

  • Prevents the state from ever being set to closed

    Why it's wrong here

    The script runs on an existing record; it only aborts if the current state is already closed, not preventing future updates to closed.

  • Aborts the update if the record is already in closed state

    Why this is correct

    The condition checks if state equals 'closed', and if so, setAbortAction(true) prevents the database operation.

  • Sets the state to closed for all records

    Why it's wrong here

    The script does not perform any update; it only checks and potentially aborts.

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 →

How Courseiva writes practice questions · Editorial policy

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.