Thursday, October 15, 2009

detect if new spfile is uploaded

Hi

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




Thanks & Regards
Hemant Kumar
EMAIL REMOVED

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 - http://sharepointhawaii.com/randywilliams

Reply 2

Hi,

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,

-Aaron

Reply 3

Hi,

@hemantrhtk :) Please look at this link :http://www.synergyonline.com/blog/blog-moss/Lists/Posts/Post.aspx?ID=25
A great artcile for eventhandler.

Best Regards,

-Aaron

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.

Cheers-Hemant

Friday, June 1, 2007

How far I should go with customization ........

Almost every SharePoint project starts with elaborating  what the current version of SharePoint supports as Out of Box  feature .

But at the end of the day , level of customization we require in these OOB feature is huge.

To make it easy for future upgrades and better performance and really really get what Microsoft promise , we should be inclined towards no  customization.

Sunday, June 4, 2006

What's the difference between Abstract classes and Interfaces?

Features                                      Interfaces                                abstract class

Multiple inheritanceA class may inherit several interfaces.A class may inherit only one abstract class.
Default implementationAn interface cannot provide any code, just the signature.An abstract class can provide complete, default code and/or just the details that have to be overridden.
Access ModfiersAn interface cannot have access modifiers for the subs, functions, properties etc everything is assumed as publicAn abstract class can contain access modifiers for the subs, functions, properties
Core VS PeripheralInterfaces are used to define the peripheral abilities of a class. In other words both Human and Vehicle can inherit from a IMovable interface.An abstract class defines the core identity of a class and there it is used for objects of the same type.
HomogeneityIf various implementations only share method signatures then it is better to use Interfaces.If various implementations are of the same kind and use common behaviour or status then abstract class is better to use.
SpeedRequires more time to find the actual method in the corresponding classes.Fast