Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've creted an asset library for holding pictures and I've created an event reciever for the ItemUpdating event. When the item is updated, the method is called three times(!?!). I've noticed that two of the times the properties.ListItem is null.

My library settings are: "Require content approval" to "Yes" "No versioning" "Require documents to be checked out before they can be edited" is "No"

I've searched the problem and found out that if the "require checkout" option of the library is set to yes, the event receiver should have a similar behaviour as it does some work checking in and out the document. However mine is not.

If anyone have any insight in this, please share :) Thanks in advance.

share|improve this question
add comment

1 Answer

If you update the same item in your code, you should use EventFiringEnabled property, take a look at this post

share|improve this answer
    
That's really helpful post, thanks. However I was looking for somrthing else. I do want the event to fire as I have some custom logic in them too. What I want to know is why the ItemUpdating event is firing 3 times and what kind of work is done in the 2 calls when the properties.ListItem parameter is null. It's interesting to me as there should not be any checkin/checkout in the list. Or does checkin/checkout always happen for item and it's just hidden from the user? –  Николай Цонев May 14 '12 at 8:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.