HomeDevelopment (Old) The file has been modified by ... unknown

[Sharepoint 2010 – Error Fixing] The file has been modified by … unknown

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;
- Advertisement -

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

CONNECT FOR MORE CONTENT

DO NOT MISS THOSE ARTICLES

Recent Comments