I would like to add an attribute to the email entity that should keep the number of attachments related to that email.
I've been thinking on a plug-in that will trigger on the update event of email, count the related activitymimeattachments with a RetrieveMultiple, and then update the email attachmentCount attribute.
However, I am a little sceptical to use an update within the "update"-plugin because of the possibility of endless loops..
Is there another approach that I should use?
-Stian-