Skip to content

Commit 264cd6c

Browse files
Create emailAlert.js
1 parent ff32526 commit 264cd6c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#BusinessRule
2+
(function executeRule(current, previous /*null when async*/) {
3+
4+
// Add your code here
5+
if(!current.isNewRecord()){
6+
var gr=new GlideRecord('incident');
7+
gr.addQuery('parent_incident',current.sys_id);
8+
gr.query();
9+
var c=gr.getRowCount();
10+
11+
g_scratchpad.num=c;
12+
}
13+
14+
})(current, previous);
15+
16+
#ClientScript
17+
18+
function onLoad() {
19+
//Type appropriate comment here, and begin script below
20+
var res=g_form.isNewRecord();
21+
if(!res){
22+
var number=g_scratchpad.num;
23+
alert("Child incident count of this record :"+number);
24+
}
25+
26+
}

0 commit comments

Comments
 (0)