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

Can I programmatically detect if a document in a library is uploaded or created with the "new document" button?

When a user uses the "new document" button, my ItemUpdated event receiver doesnt fire, so my plan is to manually fire it in ItemAdded.

share|improve this question
add comment

1 Answer 1

ItemUpdated and ItemUpdating fire when an existing item CHANGES. This is regardless of whether it is a library or a list, or how an item is added to a library.

ItemAdded and ItemAdding fire when a NEW item is added to a list or library, use that event instead. BTW, the difference between ItemAdded and ItemAdding is that ItemAdded fires AFTER the item has been added, while ItemAdding fires BEFORE, so you have the ability to cancel the Add (or Update, in the case of ItemUpdating).

share|improve this answer
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.