SNOW-CAD Practice Question: Application development using ServiceNow Studio
A company uses a scoped application to manage IT equipment. The application has a client script that calls a GlideRecord query on a large table. Recently, the script started showing 'Script exceeded maximum execution time' errors. The developer checks the Studio debugger and sees the query runs on the entire table without filters. The developer needs to fix this issue. The environment is production, and downtime must be minimized. Which course of action should the developer take?
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
✓
Move the query to a Business Rule and use a client-callable API.
Moving the query to a Business Rule and using a client-callable API (like GlideAjax) offloads the heavy processing to the server side, avoiding client-side timeouts. Option B is incorrect because increasing the script execution timeout only delays the issue and does not fix the root cause of the query running without filters. Option C is incorrect because GlideAggregate is used for aggregation functions like count, sum, etc., not for retrieving records; the problem is an unfiltered query, not aggregation. Option D is incorrect because adding an index helps with performance for filtered queries, but if the query has no filters, an index does not help as it still needs to scan the entire table.
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 query to a Business Rule and use a client-callable API.
Why this is correct
Correct. Offloading to server-side solves the timeout and improves performance.
- ✗
Increase the script execution timeout in system properties.
Why it's wrong here
Incorrect. This masks the problem and may cause other issues.
- ✗
Use GlideAggregate with multiple queries.
Why it's wrong here
Incorrect. GlideAggregate is for aggregation, not for retrieving records.
- ✗
Add an index on the table.
Why it's wrong here
Incorrect. Without filters, an index won't help.
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.