How Value Return in Before Properties, After Properties and ListItem using EventReceiver in SharePoint2010

Event receivers are common in SharePoint development so its better to understand the data available in each events. Sometimes as a developer we jump into coding before thinking about contextual data availability.One more important thing to notice list event receiver  and document library event receiver are different items of contextual data availability.Following Table will give you a clear picture about the contextual data in each events.

  • SharePoint List

Event

Before Properties Returns

After Properties Returns

ListItem Returns

Event Type

Item Adding

Null Value

New Value

Null Value

Synchronous

Item Updated

Null Value

New Value

New Value

Asynchronous

Item Updating

Null Value

Changed Value

Current Value

Synchronous

Item Updated

Null Value

Changed Value

New Value

Asynchronous

Item Deleting

Null Value

Null Value

Current Value

Synchronous

Item Deleted

Null Value

Null Value

Null Value

Asynchronous

  • SharePoint Document Library

Event

Before Properties Returns

After Properties Returns

ListItem Returns

Event Type

Item Adding

Null Value

Null Value

Null Value

Synchronous

Item Updated

Null Value

Null Value

New Value

Asynchronous

Item Updating

Current Value

Changed Value

Current Value

Synchronous

Item Updated

Current Value

Changed Value

New Value

Asynchronous

Item Deleting

Null Value

Null Value

Current Value

Synchronous

Item Deleted

Null Value

Null Value

Null Value

Asynchronous