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 ebf1353 commit 97133fdCopy full SHA for 97133fd
Server-Side Components/Business Rules/Update Incident State To Closed/script.js
@@ -0,0 +1,20 @@
1
+var pSysId = 'sys_id';
2
+var child= new GlideRecord('incident');
3
+child.addQuery('parent_incident',pSysId);
4
+child.query();
5
+var count=0;
6
+while(child.next()){
7
+
8
+ if(child.state!=7)
9
+ {
10
+count =1;
11
+ gs.print("your child incident is not there or is not yet closed");
12
+ }
13
+}
14
+if(count==0){
15
+ child.parent_incident.state=7;
16
+ child.parent_incident.close_code='Duplicate';
17
+child.parent_incident.close_notes="done";
18
+child.parent_incident.update();
19
+gs.print("hello" + child.parent_incident.number);
20
0 commit comments