1

We have event receivers for List, List field, List items, Web, Site and List email.

How do we decide the feature scope of the event receivers?

Is it best practice to set it to sitecollection or web application?

2 Answers 2

3

Generally scope should be Web because Event Receivers are triggered by certain events on either a SPWeb, SPList or SPListItem. We can categorize SharePoint events in two different categories: by the “level” which fires the event (site, list, item), and by the type of the event (synchronous and asynchronous).

Again depends what you want to achieve... scope can be site also For example : if your feature is scoped at the Site level for List event receiver , the receiver will bind to all list instances in the site collection.

1
  • the question is specifically regarding which scopes are applicable to event receivers and your answer does not relate to this.
    – variable
    Commented Jul 28, 2014 at 6:13
-1

Event Receiver Feature must be set as Web Scope..

http://msdn.microsoft.com/en-us/library/ms454835.aspx

4
  • Web or Site is the correct scopes Commented Jul 28, 2014 at 5:20
  • Site Scope will bind to More than One List if available in more than one web. Commented Jul 28, 2014 at 5:38
  • @RobertLindgren how do you decide web or site feature-scope?
    – variable
    Commented Jul 28, 2014 at 6:13
  • 1
    See @priyankagupta 's answer. It dependes on the granualarity you want (do you want to control it per web, or do you want it on all webs in a site collection) Commented Jul 28, 2014 at 6:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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