none
EWS - SyncFolderItems - How to find deleted items RRS feed

  • Question

  • Hi there,

    I try to develop small sync app for contacts in EWS. I use SyncFolderItems to get list of deleted items (ChangeType.Delete).

    I receive list correctly, but there are only ItemIds and I can't find any items with these ItemIds in any folder.

    How can I recognize from this ItemId which item was deleted ?

    Thanks

    David G.


    Friday, December 20, 2013 7:46 AM

All replies

  • When you delete an Item depending on how its deleted different things may happen, eg the Item maybe moved into the users deletedItems folder or if they shift delete (or another users deletes the Item from a Shared Folder) then the Item will go straight in the dumpster. On Exchange 2010 if you have Single Item recovery enabled https://blogs.technet.com/b/exchange/archive/2009/09/25/3408389.aspx then it will go into the Dumpster v2 folders eg WellKnownFolderName.RecoverableItemsDeletions.

    In all of these senerios because the Item is being moved it will be assigned another ItemId so the ItemId's returned by SyncFolderItems are just for your referance and you need to track them at the client side to another property that doesn't change when the Items are moved(deleted) so if you do want to access it you can search on that property. For this you can use either a custom property that you create yourself eg http://msdn.microsoft.com/en-us/library/dd633654%28v=exchg.80%29.aspx . Or you can use one of the exsting properties like the PR_Search_Key http://msdn.microsoft.com/en-us/library/office/cc815908.aspx which should be globaly unique and not change when the Items are moved into the RecoverableItems folder.

    Cheers
    Glen

    Saturday, December 21, 2013 6:00 AM