Attachment updates in Activity log

kristajw
Mega Contributor

Hello,

When an attachment is added to an Incident, and Attachments is selected in the Activity log it shows that an attachment has been added in the activity log.

However, if said attachment is removed all traces of an attachment in the activity log are also removed. Is there any way of editing Attachments in the activity log to show that it has been removed, and who by? 

Thanks

Krista

1 REPLY 1

danielbilling
Kilo Guru

Add a business rule to sys_attachment table for incidents. then you can push and update to the incident for update and delete.

 

something like :

updateRecordForAttachment();
function updateRecordForAttachment(){
var gr = new GlideRecord(current.table_name);
if(gr.get(current.table_sys_id)){
gr.work_notes = "Attachment: " + current.file_name + " has been removed.";
gr.update();
}
}