Skip to content

Commit f5784bb

Browse files
Fetch active incidents assigned to a specific group(GlideRecord) (#1660)
* Create README.md * Create code.js
1 parent aa52bc8 commit f5784bb

File tree

2 files changed

+11
-0
lines changed
  • Core ServiceNow APIs/GlideRecord/Fetch active incidents assigned to a specific group.

2 files changed

+11
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This script basically built to pull active incidents for a particular group in order to act quickly.
2+
Demo script retrieves all active incidents assigned to the "Network Support" group.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
var gr = new GlideRecord('incident');
3+
gr.addQuery('active', true);
4+
gr.addQuery('assignment_group.name', 'Network Support');
5+
gr.query();
6+
7+
while (gr.next()) {
8+
gs.info('Incident Number: ' + gr.getValue('number'));
9+
}

0 commit comments

Comments
 (0)