When working with SharePoint lists and document libraries it’s easy to forget what properties exist when working with event receivers. This really only applies to those still writing on-premises C# code!
SharePoint List
List | BeforeProperties | AfterProperties | properties.ListItem |
ItemAdding | No Value | New Value | Null |
ItemAdded | No Value | New Value | New Value |
ItemUpdating | No Value | Changed Value | Original Value |
ItemUpdated | No Value | Changed Value | Changed Value |
ItemDeleting | No Value | No Value | Original Value |
ItemDeleted | No Value | No Value | Null |
Lists are fairly straightforward with no before properties available.
SharePoint Document Library
Library | BeforeProperties | AfterProperties | properties.ListItem |
ItemAdding | No Value | No Value | Null |
ItemAdded | No Value | No Value | New Value |
ItemUpdating | Original Value | Changed Value | Original Value |
ItemUpdated | Original Value | Changed Value | Changed Value |
ItemDeleting | No Value | No Value | Original Value |
ItemDeleted | No Value | No Value | Null |
Hopefully this is a useful reference to someone. I know I look this up quite often and I’m worried it will soon disappear off the face of the internet as the world forgets on-premises SharePoint.