Thursday, November 17, 2005

Attach an Event sink with Multiple Document Libraries

Attach an Event sink with Multiple Document Libraries
There is no easy way in SPS 2003 to attach an event sink with multiple document libraries. You have to iterate each one manually or programmatically, following is the hack for this (SPS 2003)
For existing doclibs
Db: _Site
update lists set
     tp_EventSinkAssembly = 'WSSEventSink, Version=1.0.0.0, Culture=neutral,                                          PublicKeyToken=56761703e95c64a0',
     tp_EventSinkClass ='WSSEventSink.EventSink'
where tp_ServerTemplate = 101 --doclib

For newly created doclibs
Schema.XML
<List  EventSinkAssembly="WSSEventSink, Version=1.0.0.0, Culture=neutral, PublicKeyToken=56761703e95c64a0" EventSinkClass="WSSEventSink.EventSink"

No comments: