← ServiceNow CAD: develop and deliver applications
06 / 8 · 40 MIN

Properties, events, and jobs

Make logic reusable, configurable, and observable.

Concept and mechanism

Application properties hold relatively stable configuration, such as an operating mode or approved threshold. getProperty returns a string for an existing value: the string false remains truthy in JavaScript. Compare explicitly with the expected value and define a safe default. Do not call setProperty on every transaction to maintain counters: documentation warns about cache flush and degradation while caches rebuild. Frequently changing state belongs in an appropriate data model. Centralize common rules in a Script Include so forms, jobs, and automation share one interpretation. Class name, prototype, and type should be consistent, and Accessible from should match intended consumers. Do not make all code public merely to fix one call.

Guided application

eventQueue places an event on a queue and can carry two parameters; this does not prove that every consumer has finished. Define parameter meaning, correlation, and minimum data. A scheduled job follows its time configuration and, when conditional, depends on a final Boolean expression. Confirm Time zone and Run as when Lisbon and Paris compare timing and permissions. During daily closing, a false condition can explain no execution despite the job being Active. If runs can overlap, design protection against repeated effects and a recovery mechanism without assuming exactly one execution per record. Logs should distinguish selection, attempt, and outcome without storing unnecessary financial information. These decisions make automation understandable to the people providing out-of-hours support.

IN PRACTICE

Boolean("false") is true; an explicit comparison avoids enabling a disabled feature.

Common pitfalls

Configuration treated as counter; queue treated as delivery; Active treated as proof of execution.

Related topics: Needs, data, and design · Scope, modules, and dependencies · Forms and client/server logic

Take this idea with you

Make types, time, identity, and outcome explicit.

Create account

Reference: Scoped GlideSystem API · CAD blueprint January 2026