Skip to content

Commit 76ad8c3

Browse files
Getting install base items with active cases (ServiceNowDevProgram#709)
1 parent 955e0cc commit 76ad8c3

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Install base items with active cases
2+
3+
This script will run **RLQUERY** on the `sn_install_base_item` table and get active cases by the help of `RLQUERYsn_install_base_m2m_affected_install_base` table.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
var ibGr = new GlideRecord("sn_install_base_item");
2+
ibGr.addEncodedQuery("RLQUERYsn_install_base_m2m_affected_install_base.install_base,>0,case.active=true^ENDRLQUERY");
3+
ibGr.query();
4+
5+
while (ibGr.next()) {
6+
// Do something
7+
}

0 commit comments

Comments
 (0)