Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2021 03:37 PM
You can create an async Insert Business Rule on the sc_req_item table. If you want the attachment(s) to appear in the header instead of the activity stream, use this script.
(function executeRule(current, previous /*null when async*/) {
var attach = new GlideRecord('sys_attachment');
attach.addQuery('table_name', 'ZZ_YY' + current.getTableName());
attach.addQuery('table_sys_id', current.sys_id);
attach.query();
while(attach.next()){
attach.table_name = current.getTableName();
attach.update();
}
})(current, previous);