Pages

IMG

[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 Office 365 / SharePoint Consultant. Started on MOSS2007 - More Infos Here -

RSE

Rechercher dans ce blog

Where Users are from ?