The second time they fire it is in response to the document being checked in.

If you find yourself in this situation, then you’ll have to solve the problem in code.

Fortunately, there is a relatively simple way to check whether the Item Updating and Item Updated events are firing in response to a check-in outlined in Knowledgebase Article 939307.

Next, let’s look at what happens when the user adds a document when the Require Check Out option is enabled.

The first time the Item Updating and Item Updated events fire it is in response to the document properties changing.

For example, if you define an instance level variable in the class to store data in the Item Updating event, then try to access that data in the Item Updated event, you will find that the data is not there when you go to check it in the Item Updated event.

This is because you have two classes – one that is handling the Item Updating event and in which the instance level variable is set, and one that is handling the Item Updated event in which the instance level variable is not set.

Sometimes that is the most exciting way to learn, but for those less adventurous I will briefly cover the topic here.

You can think of an item event receiver like a database trigger: it has different events that fire during the course of Share Point running an operation on a list item (or document item).

Damon gives just one example of a poisoned dagger in the game of Sharepoint Development: The Item Event Receiver.

I’m usually disappointed when writers employ oft-overused metaphors to describe a situation.

You just have to check to see if the vti_sourcecontrolcheckedoutby property on the item was cleared: This code is using the Before Properties and After Properties on the properties parameter to see what the value of the vti_sourcecontrolcheckedoutby property on the item was before the update occurred, and what it will be after the update has completed.