Skip to content

Commit 81c3440

Browse files
authored
Create readme.md
1 parent 0b3050c commit 81c3440

File tree

1 file changed

+31
-0
lines changed
  • Client-Side Components/Client Scripts/Abort direct incident closure without Resolve State

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
📘 README — Incident State Validation (Client Script)
2+
Overview
3+
4+
This Client Script enforces the correct ITIL incident lifecycle by preventing users from directly closing an incident without first transitioning it through the Resolved state.
5+
If a user attempts to move the state directly to Closed Complete, the system reverts the change and displays a notification.
6+
7+
What This Code Does
8+
Monitors changes to the state field on Incident form
9+
Checks if new selection is trying to skip the Resolved step
10+
Reverts state to its previous value when the rule is violated
11+
Alerts the user with a clear and guided message
12+
Refreshes the form to maintain data consistency
13+
Usage Instructions
14+
15+
Create a Client Script on the Incident table
16+
Type: onChange
17+
Field Name: state
18+
Paste the script under the script section
19+
Test by trying to directly move an Incident to Closed Complete
20+
S
21+
cript Requirements
22+
State values must be configured as:
23+
6 → Resolved
24+
7 → Closed Complete
25+
26+
Script runs only on Incident records
27+
Must be active in applicable ITIL views
28+
Notes for Developers
29+
This code supports clean transition handling for ITSM workflows
30+
Helps enforce process compliance without server-side overhead
31+
Recommended for environments requiring strict closure governance

0 commit comments

Comments
 (0)