SNOW-CAD Practice Question: Automating application logic with business rules and scripts
A company uses a business rule to set a field on the Incident table based on the caller's department. However, the rule runs correctly on insert but not on update. The developer suspects the condition is incorrect. The current script uses: if (current.operation() == 'insert' && gs.getUser().getDepartment() == 'IT'). What might be the issue?
⚠ Common exam trap
Watch out — candidates often confuse the session user (`gs.getUser()`) with the record's related user (e.g., caller_id), leading them to overlook the need to dot-walk to the caller's department instead of using the logged-in user's department.
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 condition should check current.caller_id.department instead
The business rule should check the department of the caller associated with the incident record, not the logged-in user. The condition `current.caller_id.department` retrieves the department value from the caller's user record via a dot-walk to the sys_user table, ensuring the rule triggers based on the incident's caller, not the session user. The current script incorrectly uses `gs.getUser().getDepartment()`, which returns the department of the user running the update, which may differ from the caller's department, causing the rule to fail on update.
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 condition should check current.caller_id.department instead
Why this is correct
The script should use current.caller_id.department to reference the caller's department.
- ✗
The rule is set to run only on insert
Why it's wrong here
If it only ran on insert, it wouldn't run on update at all, but the symptom is that it runs on insert correctly.
- ✗
The script uses synchronous business rule instead of asynchronous
Why it's wrong here
Synchronous vs asynchronous does not affect the condition.
- ✗
The condition should use current.operation() == 'update' as well
Why it's wrong here
While adding an 'update' condition is needed, the main issue is the use of gs.getUser().
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.