Skip to content

Commit 800c0cc

Browse files
countAssignedUtil.js
1 parent 06c5594 commit 800c0cc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
var countAssignedUtil = Class.create();
2+
countAssignedUtil.prototype = Object.extendsObject(AbstractAjaxProcessor, {
3+
4+
getCount: function() {
5+
var ga = new GlideAggregate('incident');
6+
ga.addQuery('assigned_to', this.getParameter('sysparm_assignedto'));
7+
ga.addAggregate('COUNT', 'assigned_to');
8+
ga.query();
9+
while (ga.next()) {
10+
var assignedIncident = ga.getAggregate('COUNT', 'assigned_to');
11+
return assignedIncident;
12+
}
13+
},
14+
type: 'countAssignedUtil'
15+
});

0 commit comments

Comments
 (0)