I've been with this problem for days and as much as I've tried everything I've read, nothing works for me.
When uploading a file to a Sharepoint library, I try to fill one of its metadata through a development. In doing so I get a conflict error of saving the file. The code is as follows:
public override void ItemUpdated(SPItemEventProperties properties)
{
base.ItemUpdated(properties);
if (properties.List.Title.Equals("Process"))
{
EventFiringEnabled = false;
string numExped = "0001";
properties.ListItem["ExpedNumber"] = numExped;
properties.ListItem.Update();
EventFiringEnabled = true;
}
}
I've tried a thousand things, from putting SystemUpdate instead of Update. Also put a false as a parameter to the Update. Remove and put the EventFiringEnabled. Instance an item instead of using the properties.ListItem .
But nothing, when I enter the metadata and pulse protect, I always get this error:
The file is saved but remains unprotected. Can someone tell me what I'm doing wrong? Thanks, best regards;)