Attachment event

sloz79
Kilo Explorer

Hey all,

I've been wondering if anyone has been able to hook an Event that fires on Attachments?

What I would like to be able to do is send a specific Notification when an attachment has been uploaded by a user, and of course the way to do this is by hooking the Notification in with an event. I've made sure that no 'out of the box' attachment event exists on our instance by default for Attachments. I've also searched the Wiki and the Community forums for answers but have found none.

Has anyone faced the same or similar problem?

Has anyone been able to implement a solution short of rewriting the Attachment paperclip?

Thanks,
Matt

2 REPLIES 2

Not applicable

Hey Matt,

I wouldn't rewrite the paperclip (can we call him Clippit??)

In /demo today I've added a new business rule on the Attachment [sys_attachment] table which fires an event when a new record (ie attachment) is inserted. I've also added a custom event in the registry. From there, create your email notification to respond to sys_attachment.inserted as required.

Note this will also respond to inbound email attachments etc too (all attachments in the system) not just added manually via Clippit. Not a big issue, just something to note.


michelek
Kilo Explorer

Since we're talking attachments, let me run this by you. We want to be able to add attachments that the end-user can't see. The only thing I can figure is add a new field to designate internal or external, then set up a related list to only show one or the other, however the attachment macro would probably show them both and I'm not that good with XML yet. Anyone else have any thoughts?

Thanks-Michele