I am working on sharepoint server 2013. and i have developed an event receiver which fires when lists items are updated. now i define the following setting inside the
elements.xml for my solution:-
<Receivers ListUrl="Lists/Issue Manage">
so that the event receiver will only fire on the lists which have the following url
Lists/Issue Manage. Then i try deploying the solution using visual studio 2012, but i got the following error:-
Error 1 Error occurred in deployment step 'Activate Features': The list "Lists/Issue Manage" doesn't exist. Please fix the ListUrl attribute. 0 0 CustomerSitesER
now i changed the feature scope from "
Web" (which is the default) to "
Site" , and try to re-deply the solution , where the solution got deployed without errors.
so my question is why i can not use the
ListURL when the solution scope is defined as
second question now when i define the feature scope as
Site the solution was deployed successfully, but the event receiver was fired on all the lists even the lists that does not have the following url
ListUrl="Lists/Issue Manage". so not sure why this is happening ? as i know defining
ListURL inside the feature's
element.xml file should restrict the event receiver to got fired on the related lists only. but seems this is not the case.