Skip to main content
2 of 2
Revised answer to suit revised question
Jack
  • 261
  • 1
  • 6

Updated to match revised question

The lifetime of an event receiver object is for the action occurring. For example, if you were to override the ItemAdding event you intercept the item as it is before it is added. Obviously an item can only be added once, so ItemAdding (before it is actually added) and ItemAdded (immediately after its added) will only execute once.

OnUpdated events will occur anytime the item is changed. This would include files being renamed, metadata being added to the item by updating fields, or updating the document. Items can be updated multiple times, so this event will fire every time. It will not fire at the same time as ItemAdded.

To suit your scenario, you would want to use the ItemAdding event to capture the item and document prior to it being added to the library. You can then contact your 3rd party software, receive the metadata, add the metadata to the item, then allow the procedure to continue.

Since the ItemAdding or ItemAdded event only fires when the document is originally added to the library, you don't have to worry about multiple outside calls.

ItemAdding Event Receiver on MSDN

Jack
  • 261
  • 1
  • 6