Exchange Server TechCenter >
Exchange Server Forums
>
Development
>
Exchange behaviour regarding AttachmentIds
Exchange behaviour regarding AttachmentIds
- Hi All,
I've discovered that when I modify CalendarItem in any way (add/delete attachments or just change subject) attachment ids that already exists on this items are changed. It is very weird for me. Because I use this ids in opposite system for replication. So is there are any way to rely on immutable attachment id? If there are exist such kind of Id how can I get this one? I use EWS, C#
All Replies
- uppa
- uppa
Hey, guys... still don't have an answer :(
Attachment Ids are encoded in such a way that they contain the Id of the root item (the item to which the attachment belongs). The Id of the root item doesn't change when an item id modified, although the item's ChangeKey is (but the ChangeKey is not encoded in attachment Ids).
For calendar items however, some operations (such as accepting) result in the calendar item being recreated. In that case, not only the Ids of the attachments to the item change, but the item's Id also changes.
Exchange 2010 (and I believe Exchange 2007 SP2 as well) return the new Id of the calendar item when such a re-creation occurs.
David Claux | Program Manager - Exchange Web Services- Proposed As Answer byDavid Claux - MSFT Thursday, November 05, 2009 5:02 PM
- Thanks for reply.
Yes, I know that when Exchange re-creates calendar item (actually meeting) on some operations. It's not a problem for me, because I handle UID in that case which is tha same for organizer and attendees. But for attachment Exchange re-generate every time new AttachmentId. The question: Is there are any way in Exchange 2007 SP1 have some kind of stable AttachmentId. I need some id to handle replication. I store AttachmentId on opposite system, but when it re-creates by Exchange there is a problem. - I am sorry, but I am unable to reproduce the behavior you are describing. As indciated before, when an item is updated, only its change key is modified. Its Id and the Ids of its attachments are unchanged.
David Claux | Program Manager - Exchange Web Services


