Pages

[Sharepoint 2010 - Error Fixing] The file has been modified by ... unknown

mercredi 30 novembre 2011

I got the following error message in visual studio during programing :

"The file has been modified by ... unknown"

It was because i called two times (by error) the item.update(); method.

This could happen as well when you code an event receiver (sometime happening when you do something on a list, web, site....) and you use item.update(), in order to fix that :

  •  call and disable event firing before your code with : base.EventFiringEnabled = false;
  • update your item by calling item.systemUpdate(false); 
  • enable event firing with : base.EventFiringEnabled = true;

Aucun commentaire:

 

Blogroll

Jeff ANGAMA, is a business / technique consultant around SharePoint 2013 technologies. - More Infos Here -

Rechercher dans ce blog

Follow by Email

Where Users are from ?