The wording is curious here, so I thought I’d take some time to test each combination of common events such as Add, Update and Delete.
As many of you know, event receivers are a great way to hook into various Share Point events.
These can apply to Feature events such as Feature Activated, List events such as Field Added, and many others.
After Properties["Email"] will be NULL in the event receiver code.
After Properties will have the correct value, only when Email is also updated through code.
The Synergy MOSS blog has a really good post describing exactly what properties will contain a hash table and which will be empty depending on which list type the event is coming from and in which method (e.g.
Helm Ifort on Sun, these are the results that I am getting in Item Updating event receiver in a form library: properties. You can debug the code and check the if there is any internal name is being used for "currentusername" column due to which your not getting value. After Properties["Modified By"] this will give you latest modified by username.
In other words, if we wanted to set a value “Tax Area” to “Europe” we’d do: In our case, however, we didn’t know what these properties were before hand.
Rather, we were ‘inheriting’ values from a parent folder.
Note: Allegedly, this does change if the event receiver is synchronous – the before properties are available. Obviously, for Share Point 2007 systems that doesn’t apply – as ‘*ed’ event receivers are always asynchronous. Are people worried about events not being handled ‘cos firing is disabled, or is this just a convenient way of tracking whether events are enabled or not?
Share Point allows you to attach event receivers to content types. Unfortunately, deleting event receivers from those content types is much more hard. Continue reading In Share Point, Event Handlers (or Event Receivers – whichever terminology, a child of SPItem Event Receiver) can be registered against lists/libraries.
Perhaps this is why the Document ID feature fails to remove the content types that it adds. I’ve got an event handler on a Share Point list that’s fairly long running, and this then raised a question in the office – do these settings control event firing for the currently running event handler, or for the entire list? You can do this through an SPWeb (site) scoped feature, declaratively or programmatically with an SPEvent Receiver Definition.