Skip to content

Commit a0b135c

Browse files
authored
incHavingAttachments.js
Fetching all the active incident records which are having attachments and storing it in an array
1 parent be1fd1a commit a0b135c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//GlideRecord the [incident] table and fetching all the active incident records having attachments
2+
3+
var incWithAttachment = [];
4+
var checkAttachments = new GlideRecord('incident');
5+
checkAttachments.addActiveQuery();
6+
checkAttachments.query();
7+
while (checkAttachments.next()) {
8+
if (checkAttachments.hasAttachments()) {
9+
incWithAttachment.push(checkAttachments.number.toString());
10+
}
11+
}
12+
gs.info("Incident Records having attachment: " + incWithAttachment);

0 commit comments

Comments
 (0)