El Blanco's Office 2007 Blog

Friday, August 31, 2007

Event Receiver Management

One of the things from SPS 2003 that didn't make it into MOSS 2007 was a way, via the UI, to specify an event receiver for a document library. This seems bizarre considering the facts that you can now have multiple event receivers for a single document library, and you can now have event receivers on lists as well as document libraries.

To get around this I've developed the "Event Receivers Manager" solution, which I've uploaded to CodePlex (http://www.codeplex.com/elblanco). This is the first of the free add-ons I intend to release for things that really bug me about SharePoint – watch this space for more useful things in the future.

Once you've downloaded the solution you can install it as normal for SharePoint:

stsadm –o addsolution –filename C:\BlancoWorld.EventReceiversManager.wsp

Then when added to the solution store you can either deploy via the Central Administration site or via the command line:

stsadm –o deploysolution –name BlancoWorld.EventReceiversManager.wsp –immediate –allowGacDeployment

This will install the "BlancoWorld SharePoint Event Receivers Manager" feature as a site collection feature – activate this feature and you'll now be good to go . . .

From a list's settings page within SharePoint will now be a new link called "Event Receivers":

Clicking on this link shows all the event receivers for the list: Using the drop-down menu you can delete existing event receivers:

Or edit existing event receivers:
You can also click the "New" toolbar button to add a new event receiver – you must specify the type, assembly name, and class name:

I hope others find this add-on useful, please leave me comments regarding any issues or improvements you'd like to see. Planned improvements at this stage are:

  • The site map provider functionality that provides the breadcrumb is not 100% there yet – I need to spend more time on it.
  • I'd like to enable column sorting on the page that lists the event handlers to allow the user to click on the column headings to sort the event handlers.
  • The "Edit" functionality from the drop down menu only actually lets you view the details. I intend to amend this to allow you to edit the properties.
  • The "Delete" functionality from the drop down menu takes you to a separate page to confirm deletion – I'd like to make this a client-side confirmation.
  • When adding a new event handler I intend to add functionality allowing you to also specify the Sequence.

I've released it as-is since I thought it might be useful for others – if you have any opinions on which of my planned improvements you'd like to see first, then let me know. Also if you have any other improvements you'd like to see, again, let me know.

Enjoy !


  • Not having any luck on a WSS 3.0 server. Is this specific to MOSS i'm guessing?

    By Anonymous Anonymous, at 12:03 pm  

  • no, I've tested this on WSS 3.0 too and mine works OK - what problems you having ?!

    By Blogger Chris White, at 3:27 pm  

  • Great work!! thanks!

    By Anonymous Anonymous, at 1:37 pm  

  • After successfully deploying the solution, the manager does not appear as a feature under Site Features. Are there any sharepoint settings that must be set properly for the .wsp file to deploy?

    By Blogger Unknown, at 12:30 am  

  • Joshua,

    It's not a site feature, it's a site collection feature - try looking here instead (assuming the solution has been added and deployed succesfully - this can be checked via central admin).


    By Blogger Chris White, at 10:08 am  

  • Cool feature

    Nice work.


    By Anonymous Anonymous, at 12:13 pm  

  • Great solution.
    Very usefull

    By Blogger Unknown, at 7:43 am  

  • How to add new event It is asking assemble and class name what is it that i need to put in

    By Anonymous Anonymous, at 6:40 am  

  • It's the class name and assembly name of your event receiver that you need to enter !

    By Blogger Chris White, at 7:35 am  

Post a Comment

<< Home