Courseiva

SNOW-CAD Practice Question: Automating application logic with business rules and scripts

A global business rule that runs on after query on the Task table is causing performance degradation. The rule modifies the query condition for all task records. The developer needs to optimize the rule without changing its functionality. Which approach is best?

⚠ Common exam trap

Watch out — candidates often assume asynchronous execution (Option C) always improves performance, but they overlook that changing the business rule to asynchronous would prevent it from modifying the query condition before execution, thus breaking the required functionality.

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

Use glideRecord.addEncodedQuery() instead of addQuery()

Using `glideRecord.addEncodedQuery()` allows the business rule to directly apply a pre-encoded query string to the GlideRecord object, which is more efficient than using multiple `addQuery()` calls. This reduces the overhead of parsing individual conditions and improves performance when modifying query conditions on the Task table, without altering the rule's functionality.

Answer analysis

Option-by-option breakdown

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

  • Move the script to a condition builder script include

    Why it's wrong here

    Condition builder script includes are for UI policies, not for optimizing business rules.

  • Convert the business rule to a script action in a flow designer

    Why it's wrong here

    This would add complexity and may not be suitable for query modifications.

  • Make the business rule asynchronous

    Why it's wrong here

    After query business rules cannot be asynchronous; they must run synchronously.

  • Use glideRecord.addEncodedQuery() instead of addQuery()

    Why this is correct

    addEncodedQuery allows passing a single encoded query string, reducing multiple database calls.

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.