Question

I am adding custom meta-data to item that user uploaded

item["Title"] = "My Title";
item["Column1"] = "column1";
item.Update();

When I comment out the item.Update() then the itemUpdated event does not fire twice. How can I add additional custom meta-data (in addition to whatever else end user is adding from the front-end)? I have to use ItemUpdated event handler.

Was it helpful?

Solution

The reasons for it firing twice can be several; one common is that your call to Update makes the receiver fire once again. Use the DisableEventFiring to prohibit the Update within your receiver to trigger another event.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top