Hi,
i've encountred a strage behavior when i was using an event receiver to a document in a sharepoint library.
The ItemUpdated fired twice when i upload a new document and i save its metadata.
Microsoft said that :
"By design, SharePoint works in this manner. When you check out a document in a document library, a local copy of that document is created. Changes that you make to that document are saved to the local copy. When you check in the document, the operation occurs in two separate steps. The local copy is first saved to the server. This save operation occurs even if you do not make any changes to the document. Then, a separate request is performed to check in the document. Therefore, the ItemUpdating event or the ItemUpdated event occurs two times."
But i didn't activate versionning on this document librar. I found in the microsoft KB a note tolding that it can occurs if a required field is installed in the library.
So i made all the required field as unrequired and my ItemUpdated was triggered only once.
For more explanation see the kb article : KB
i've encountred a strage behavior when i was using an event receiver to a document in a sharepoint library.
The ItemUpdated fired twice when i upload a new document and i save its metadata.
Microsoft said that :
"By design, SharePoint works in this manner. When you check out a document in a document library, a local copy of that document is created. Changes that you make to that document are saved to the local copy. When you check in the document, the operation occurs in two separate steps. The local copy is first saved to the server. This save operation occurs even if you do not make any changes to the document. Then, a separate request is performed to check in the document. Therefore, the ItemUpdating event or the ItemUpdated event occurs two times."
But i didn't activate versionning on this document librar. I found in the microsoft KB a note tolding that it can occurs if a required field is installed in the library.
So i made all the required field as unrequired and my ItemUpdated was triggered only once.
For more explanation see the kb article : KB
Comments
Post a Comment