Skip to content

Commit b1a2c8c

Browse files
script.js
1 parent 2aa679b commit b1a2c8c

File tree

1 file changed

+7
-0
lines changed
  • Server-Side Components/Background Scripts/Cleanup Unlinked Attachments

1 file changed

+7
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
var att = new GlideRecord('sys_attachment');
2+
att.addNullQuery('table_sys_id');
3+
att.query();
4+
while (att.next()) {
5+
gs.info('Deleting Unlinked attachment: ' + att.sys_id);
6+
att.deleteRecord();
7+
}

0 commit comments

Comments
 (0)