0

I have added a new event reciever which is supposed to work on all the document libraries present in the site. Now the problem is that it is only working for the libraries that are created after the event reciever is deployed.

My question is if this is an expected behavior and if not then what could fix this issue.

  • how did you assign the event receiver to react on document libraries? – Gwny Jul 23 '14 at 7:37
0

By default it should apply to all the document libraries in the web if the feature scope is Web, and to all the document libraries in the site if the feature scope is Site.

From your question I assume you have specified ListTemplateId="101" in your definition file.

Another possible case: if the event receiver throws an exception you will not get any message back and might feel like there are no event receivers.

Check the event receivers registered for a document library that you think is not firing the events.

Add-PSSnapin Microsoft.SharePoint.PowerShell –erroraction SilentlyContinue

$web = Get-SPWeb -Identity http://....
$list = $web.GetList($web.Url + "/lib name”)
$list.EventReceivers
$web.Dispose()

Source: http://naimmurati.wordpress.com/2012/03/22/add-modify-or-delete-list-event-receivers-with-powershell/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.