Event handlers are tricky as they deal with security and not all the required information is there for developing / customizing them. The links to all the posts are after the break.
Dan Attis gets heated up after learning about Event Handlers in his 5 day workshop and rants about it, here is an excerpt:
In v2 (2003) we only had synchronous event handlers, meaning we could only write code to do something “after” something happened in SharePoint. Now, in the new version we also have asynchronous event handlers, meaning we can write code to do something “after” something happens and also “before” something happens. This is a huge improvement and will be welcomed with open arms by SharePoint developers. You might be saying to yourself, wow, Microsoft actually listened. Yes, they did, but there are, of course, some caveats…We now have access to many new events. I have tested many and many do not work yet in the Beta2TR (I hope they fix them!).
Another post by the team at Share This Point, lists alot of the Events that are now available and also finds some documentation provided by Microsoft to be inaccurate.
It is just wrong, because the AfterProperties property is read only, and you can only get the properties, same with the BeforeProperties. I tried to put in some basic auditing using an Updating or Updated event, write to a hidden column on the item, the contents of the changes. I know there is the ChangeLog in SharePoint 2007, but I was curious to see how to do auditing with events.
And then there’s Patrick Tisseghem, one of our favorite MVP’s offering a FREE Tool which allows you to register event handlers programmatically in WSS 2007.
We have synchronous before (means you can now cancel a user action) and asynchronous after events. Events are fired not only in document libraries but now also for lists - and even at various other levels (site and web level). It is also now possible to hook up multiple event handler assemblies to your list or library you work with. During my session at the SharePoint Advisor Summit in Vegas I demonstrated a small Windows application I am using to register an event handler for a list. And I also promised to make it available for download. Here is the link to it…
Which resources are your favorite for event handlers in Sharepoint 2007?
Comments are closed for this Article !