Skip to content

Commit a6ae81d

Browse files
Get Duplicates (ServiceNowDevProgram#1482)
* script.js * readme.md
1 parent 63dc0d4 commit a6ae81d

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Using GlideAggregate function to find out tickets (tasks) with same number. OOB there happens to be a Unique checkbox at dictionary level
2+
and if in case not set to True it might create duplicate numbered tickets.
3+
Script will help find, ticekts if any.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
var dpchk = new GlideAggregate('task');
2+
dpchk.groupBy('number');
3+
dpchk.addHaving('COUNT', '>', 1);
4+
dpchk.query();
5+
while(dpchk.next())
6+
{
7+
gs.print(dpchk.number);
8+
}

0 commit comments

Comments
 (0)