Skip to content

Commit 8615d42

Browse files
authored
Create code.js
1 parent c5d5ce4 commit 8615d42

File tree

1 file changed

+10
-0
lines changed
  • GlideAggregate/Reusable function to get the count of cancelled sc tasks for a RITM

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function getCancelledSctasks(ritm){
2+
var svtaskGA = new GlideAggregate("sc_task");
3+
svtaskGA.addEncodedQuery("parent="+ritm+"^state=4^ORstate=7");
4+
svtaskGA.addAggregate("COUNT");
5+
svtaskGA.query();
6+
if(svtaskGA.next())
7+
{
8+
return svtaskGA.getAggregate("COUNT");
9+
}
10+
}

0 commit comments

Comments
 (0)