none
Event ItemAdd in DeletedItems, how to get old entryID ? RRS feed

  • Question

  • Hi everyone,

    I got a huge problem. When I put an event on ItemAdd of the folder DeletedItems, I don't know how to retreive the previous EntryID. I saw a BeforeDelete event but it's impossible to me to bind all items of Outlook at the application's startup (It would take too much time).


    Is there a way to retreive the previous EntryID ? Or another way to bind a "Deleting" event ?


    Thanks.


    P.S : Sorry for my bad english.

    Monday, September 29, 2014 11:13 AM

Answers

  • Hello,

    >  When I put an event on ItemAdd of the folder DeletedItems

    Consider using the BeforeItemMove event of the Folder class. It is fired when an item is about to be moved or deleted from a folder, either as a result of user action or through program code.

    What exactly do you need to implement? Could you please describe the final goal?

    Monday, September 29, 2014 12:35 PM
  • Be aware, the Entry ID changes when an item is moved into another store, for example, from your Inbox to a Microsoft Exchange Server public folder, or from one Personal Folders (.pst) file to another .pst file. 
    Monday, September 29, 2014 2:00 PM

All replies

  • Hello,

    >  When I put an event on ItemAdd of the folder DeletedItems

    Consider using the BeforeItemMove event of the Folder class. It is fired when an item is about to be moved or deleted from a folder, either as a result of user action or through program code.

    What exactly do you need to implement? Could you please describe the final goal?

    Monday, September 29, 2014 12:35 PM
  • Thank you for your answer. I mapped Outlook object to a tier application object. These objects are linked by their ID (EntryId for Outlook, and an other for the tier). So when I delete an item on outlook it has to be deleted on the tier application too. The entryID is really important for me to do that "synchronisation". I presume that I need to bind the BeforeItemMove. But I will try this BeforeItemMove, I think it will solve my issue !


    Thanks a lot.

    Monday, September 29, 2014 1:51 PM
  • Be aware, the Entry ID changes when an item is moved into another store, for example, from your Inbox to a Microsoft Exchange Server public folder, or from one Personal Folders (.pst) file to another .pst file. 
    Monday, September 29, 2014 2:00 PM