Search code examples
sharepointsharepoint-2007sharepoint-2010

what event is fired when an item is restored from recycle bin


what event is fired when an item is restored from recycle bin into a sharepoint list. And how to find that item using properties? please help me in this


Solution

  • According to Event Receivers on Content Types:

    Restoring from the Recycle Bin triggers all ItemAdding and ItemAdded events regardless of Content Type

    ...

    I’m starting to see the light although I do think that the Recycle Bin thing is a design flaw. Be careful on how you implement Event Receivers. Currently I’m thinking an additional check on Content Type in your code might be the safest way to ensure your code doesn’t run accidentally for a different Content Type ?

    Maybe you can use the value of the Created field to determine if the list item is truly new or if it's being restored from the recycle bin.