OfficeDev / ews-managed-api

Other
585 stars 319 forks source link

Deleted item event when an 'on behalf' calendar item is raised gives an empty item #124

Open roelwinkels opened 7 years ago

roelwinkels commented 7 years ago

Hello,

We have an exchange coupling which syncs emails and appointments to a database. When we sync appointments and delete them in outlook, we receive a moved (to trash) event, as expected, on which we can anticipate and remove the appointment from the database.

But when we grand 'editor rights' for another person on the same calendar and we let this user delete the appointment, an event is triggered from EWS and when we catch it the Item object inside this event is empty (null).

The only thing we can use is the item_id and the fact that it is a deleted item. But binding to Exchange with this item_id results in the message 'The specified object was not found in the store'.

The main reason I would like to know more about the Item is that we have 4 tables in our database, for emails, appointments, tasks and contacts. At this point I'm not aware in what table the given item_id is present, so I have to write extra sql stuff to fix this.

Eventualy I would like to know if the deleted item was a calendar item. Is there a way to find this out or is this a flaw in the event raising code from exchange? I understand EWS has nothing to do with this because the incoming parameters (like the item) is empty, but maybe there is a way around that I'm not aware off.

Thanks in advance!

Greetz, Roel