Thursday, October 15, 2009

detect if new spfile is uploaded


Is there a way to detect if
a new spfile is uploaded in document library/ old spfile is replaced for the same item
only the meta data have been edited. (may be in itemupdated eventhandler.)

Thanks & Regards
Hemant Kumar

Reply 1

When a file is replaced, the ItemUpdated event is triggered.  The same is true if you just change the metadata for the file.  Not sure if it's relevant to you, but replacing an existing file does not call ItemDeleted and ItemAdded.  In other words, it's not a delete and add operation.

Randy -

Reply 2


Yes, as Williams’s information, both file replacing action and metadata updating action trigger ItemUpdated event.

And perhaps you need to distinguish them by BeforeProperties and AfterProperties.

Here is a  Williams article for detailed information when retrieving event’s  before and after value.

Hope this can help.


Best Regards,


Reply 3


@hemantrhtk :) Please look at this link :
A great artcile for eventhandler.

Best Regards,


Reply 4

Hello Aron

Could you suggest , possibly what is is the column /property name which changes while new doc is uploaded/previous doc is overridden.

I tried the same thing before starting this thread with all the properties in loop , but could not figure out the possible column/property name.


No comments:

Post a Comment