This happens due to race condition between the two threads when updating the document / item. At the time of checking-in the document, this local copy updates the original copy (even if there are no changes), then there is another request that does check-in on the document.
SPWeb sp Web = Get SPWeb Instance(); // assuming that you have a document library by name of "My List" SPList shared Documents = web. SPEvent Receiver Definition sp Event Receiver Def = shared Documents. This is the reason why Item Updating and Item Updated are called twice (once for each step of check-in process).
Dangers lurk hidden out there which, if you run into them, can be a blow to your project and waste a great deal of time.
Damon gives just one example of a poisoned dagger in the game of Sharepoint Development: The Item Event Receiver.
Unfortunately, that makes your project like the Titanic.
I don’t mean that it’s largest and most luxurious application every written, but rather that you may be cruising headlong into a nasty rendezvous with an iceberg that could deal a severe blow to your project.
And if you have Update() or System Update() call on the document / item, this leads to getting an exception message on screen about “XYZ has already been modified”. When force checkout is enabled on document library, this is how the document editing works : When you checkout a document for editing, a local copy of the document is created that saves all the changes made by the user.We may never know about all of the dangers lurking out there, but today we’re going to cover at least one danger you may encounter while writing event receivers – an annoying issue with the Item Updating and Item Updated events firing twice.I should also point out that I know the difference between a metaphor and simile in case that was bothering you from the opening sentence. Get Control By Id("ACAssigned To ID"); Note Field ACDetails = (Note Field)Page. Update() yet keep the first fire since I need to keep applying my treatement? In Item Added() the event receiver will get fired only when the new item is added in the Item Updated() the event receiver will get fired whenever the item gets updated no matter on how may times when you update. Either in Item Added or Item Updated you can find this code available by default. Get Control By Id("ACObject ID"); User Field ACAssigned To = (User Field)Page. Update(); //if we're in the case of adding new item then the event //reciever Item Added is fired here for the second time //while Item Updated is not fired So how can I stop the second fire of item Added resulting on the item.