← Home
🔥0 DAY
⚡0 XP
📅Daily Challenge · 2026-11-08

Daily ServiceNow Scripting Challenge.

🗃️ GlideRecord · Level 2 · Worth bonus XP + streak

Set all matched incidents to state 7 (Closed) and persist the change.

close_old.js
01var gr = new GlideRecord('incident');
02gr.addQuery('state', 3);
03gr.query();
04while (gr.next()) {
05 gr.state = 7;
06 ▢ ▢ ▢ ▢;
07}

Choose the right block