We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be1fd1a commit a0b135cCopy full SHA for a0b135c
Server-Side Components/Background Scripts/Get Array of Records with Attachments/incHavingAttachments.js
@@ -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