Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//GlideRecord the [incident] table and fetching all the active incident records having attachments

var incWithAttachment = [];
var checkAttachments = new GlideRecord('incident');
checkAttachments.addActiveQuery();
checkAttachments.query();
while (checkAttachments.next()) {
if (checkAttachments.hasAttachments()) {
incWithAttachment.push(checkAttachments.number.toString());
}
}
gs.info("Incident Records having attachment: " + incWithAttachment);
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
GlideRecord in the [incident] table and fetching all the active incident records which are having attachments
and storing it in an array. This script will help to filter out incidents with attachments and based on that we can perform other actions as per the need.


Background Script:


<img width="866" height="368" alt="image" src="https://github.com/user-attachments/assets/ad9b5652-cb2f-48ac-813d-c250d334b617" />


Output:


<img width="638" height="132" alt="image" src="https://github.com/user-attachments/assets/16f1f34c-14d6-456c-8063-5d01d70c4ca4" />




Note: The output may vary based on the records present on the target audience's instance.
Loading