Here is a neat table with what you should expect where and when in SPItemEventProperties class
Sharepoint List
Event | BeforeProperties | AfterProperties | ListItem |
ItemAdding | Null | New Value | Null |
ItemAdded | Null | New Value | New Value |
ItemUpdating | Null | Changed Value | Original Value |
ItemUpdated | Null | Changed Value | Changed Value |
ItemDeleting | Null | Null | Original Value |
ItemDeleted | Null | Null | Null |
Sharepoint Document Library
Event | BeforeProperties | AfterProperties | ListItem |
ItemAdding | Null | Null | Null |
ItemAdded | Null | Null | New Value |
ItemUpdating | Original Value | Changed Value | Original Value |
ItemUpdated | Original Value | Changed Value | Changed Value |
ItemDeleting | Null | Null | Original Value |
ItemDeleted | Null | Null | Null |
Thank you! It helped me a lot!
ReplyDeleteGreat post!
ReplyDeleteA simple but not obvious information.
Saved a lot of time.
Thanks!
I am getting null values in an itemupdated event, what could be wrong?
ReplyDelete