SPItemEventProperties.ListItem Property
Gets the list item that is associated with the event that occurred.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
ListItem is null when ...
within SPItemEventReceiver.ItemAdding and SPItemEventReceiver.ItemDeleted the properties.ListItem is null.
- 10/19/2011
- flori
ItemDeleted
ListItem data member is null, Should not this be mentioned in the documentation !!
How can I know the unique id (GUID) of the deleted item then ?
How can I know the unique id (GUID) of the deleted item then ?
- 9/10/2010
- MFayez
- 10/5/2010
- Thomas Lee
Remark: This property returns null while updating a folder in the list.
You call Folder.Update() in a list.
ListItemUpdating Event receiver executes :
public override void ItemUpdating(SPItemEventProperties properties)
{
base.ItemUpdating(properties);
//ListItem is null if you are updating a folder
if(properties.ListItem==null )
{
// do something about the folder being updated
}
//
//your custom code can go here
//
}
ListItemUpdating Event receiver executes :
public override void ItemUpdating(SPItemEventProperties properties)
{
base.ItemUpdating(properties);
//ListItem is null if you are updating a folder
if(properties.ListItem==null )
{
// do something about the folder being updated
}
//
//your custom code can go here
//
}
- 7/5/2010
- Bulent COSKUN