We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 075b194 commit a50af82Copy full SHA for a50af82
Server-Side Components/Business Rules/Close State/script.js
@@ -0,0 +1,25 @@
1
+var pSysId = 'sys_id';
2
+var child= new GlideRecord('incident');
3
+child.addQuery('parent_incident',pSysId);
4
+
5
+child.query();
6
+var count=0;
7
+while(child.next()){
8
9
+ if(child.state!=7)
10
+ {
11
+count =1;
12
+ gs.print("your child incident is not there or is not yet closed");
13
+ }
14
15
16
+}
17
18
+if(count==0){
19
+ child.parent_incident.state=7;
20
+ child.parent_incident.close_code='Duplicate';
21
+child.parent_incident.close_notes="done";
22
+child.parent_incident.update();
23
+gs.print("hello" + child.parent_incident.number);
24
25
0 commit comments