Skip to content

Commit c0bf7c4

Browse files
authored
Implement error handling for parent incident resolution
Add error message for unresolved child incidents
1 parent 3c58e3b commit c0bf7c4

File tree

1 file changed

+11
-0
lines changed
  • Server-Side Components/Business Rules/Show Error Message Parent INC

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//Table: Incident
2+
//When To Run: Before update
3+
//Condition: State changes to Resolved
4+
var inc = new GlideRecord('incident');
5+
inc.addQuery('parent_incident',current.sys_id);
6+
inc.addEncodedQuery('active=true^stateIN1,2,3');
7+
inc.query();
8+
if(inc.getRowCount() != 0){
9+
gs.addErrorMessage('Resolve the child incident(s) before resovling the parent incident');
10+
current.setAbortAction(true);
11+
}

0 commit comments

Comments
 (0)