Skip to content

Commit 05572b9

Browse files
authored
Create Reusable function to get cancelled catalog tasks for a RITM
Create Reusable function to get cancelled catalog tasks for a RITM
1 parent c5d5ce4 commit 05572b9

File tree

1 file changed

+11
-0
lines changed

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+
2+
function getCancelledSctasks(ritm){
3+
var svtaskGA = new GlideAggregate("sc_task");
4+
svtaskGA.addEncodedQuery("parent="+ritm+"^state=4^ORstate=7");
5+
svtaskGA.addAggregate("COUNT");
6+
svtaskGA.query();
7+
if(svtaskGA.next())
8+
{
9+
return svtaskGA.getAggregate("COUNT");
10+
}
11+
}

0 commit comments

Comments
 (0)