ItemDeleteEvent triggers for all list items, when i have scoped for DocumentLibrary Only

I created a item delete event for document library via VS2010 Event reciever.
The problem I am facing is that the event is triggering when i delete any list item, for example Calendar/Announcements/Tasks items.. Why it is triggering for all list Items?

While creating the project i have clearly speicified Doc.lib oly.. PFB the Elements.xml.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Receivers ListTemplateId="101">  <--! 101 is refers doc Lib list template id-->
      <Receiver>
        <Name>EventReceiver1ItemDeleting</Name>
        <Type>ItemDeleting</Type>
        <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
        <Class>ItemDeleteEvent_Search.EventReceiver1.EventReceiver1</Class>
        <SequenceNumber>10000</SequenceNumber>
      </Receiver>
  </Receivers>
</Elements>

July 4th, 2013 5:16am

Hi,

"It appears that ListTemplateId, ListTemplateOwner, and ListUrl are ignored for Site scoped features. When I moved my Event Receiver element to a Web scoped feature, the receiver was properly attached only to the desired list."

Can you look into following post:

http://stackoverflow.com/questions/4014020/how-can-i-add-event-receiver-only-for-list-with-specyfic-template-

July 4th, 2013 5:38am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics