I'm trying to use Exchange Web Services to update a calendar item. I'm creating an ItemChangeType, and then an ItemIdType. I have a unique ID to use for ItemIdType.Id, but I have nothing to use for the ChangeKey. When I leave it out, I get an ErrorChangeKeyRequiredForWriteOperations. But when i try to just put something in there, I get an ErrorInvalidChangeKey.
What can I use for this to get it to work?
I'm also trying to determine what is the best implementation of BaseItemIdType to use for ItemChangeType.Item. So far, I'm using ItemIdType, and I'm guessing that's correct, but I haven't been able to find any particularly helpful documentation on this.
To be a bit more explicit on Hauge's answer: the ChangeKey is stored in Exchange and identifies the current state of the item. Any change to that item creates a new ChangeKey.
This allows Exchange to "know" that your update is being applied to the same item state as when you looked at the item - it hasn't changed since you checked it.
Some code available at: http://msdn.microsoft.com/en-us/library/aa563020.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With