Attachment events and logging

Uploading, viewing, and deleting file attachments triggers a single event that can be used for notifications or in scripts. Attachment events can be processed by a script action or notification.

Only one event is created when action is taken on a record with attachments, even when the record has multiple attachments. The following events are provided.

Table 1. Attachment events
Event Description
attachment.read An attachment has been read or downloaded.
attachment.uploaded An attachment has been uploaded. If multiple attachments are uploaded to a record at one time, only one event is created.
attachment.deleted An attachment has been deleted. This event is also triggered when the record containing the attachment is deleted. If a record is deleted that contains multiple attachments, a separate event is triggered for each attachment in the deleted record.
attachment.renamed An attachment has been renamed.

Attachment logging

When an attachment is downloaded, the attachment.read event record is written, and you can do something with this event. For example, you can record when and by whom certain attachments are downloaded. For this functionality, current is a sys_attachment record, and the event record uses the following parameters:
  • parm1: File name
  • parm2: Table name