Below piece of code can be used to update SharePoint list item inside any event receiver. I have written it for Updated event receiver.
public override void ItemUpdated(SPItemEventProperties properties)
{
//some handling here
ListItem item = properties.ListItem;
item["someproperty"] = "some value";
this.DisableEventFiring();
//save changes added
Item.Update();
this.EnableEventFiring();
}
No comments:
Post a Comment