Tag Info

Hot answers tagged

3

The event receiver will run under the account of the user who has triggered that event, like say ItemAdding will run under the account of the user who has added the item etc. You can use properties.CurrentUserId to get the id of the user under whose context code will be executed. See this blog for more details


2

There is another option how to add Event Receiver to a specific List - add the Event Receiver to the Content Type. Steps: Create custom Content Type for a List Add the Event Receiver to the Content Type Add Content Type to a specific List in order to register the Event Receiver In that case you will be able to control on which List an Event Receiver ...


1

I found some documentation referencing the above behavior and explains it. When attaching content-types to lists/libraries, the content-types event-handlers are automatically added to the list's event-handler collection. This it to support some basic list/library functionality which has been around since WSS 3.0 already. Even though all the event-handlers ...


1

It's hard to know exactly what your error is but it looks as though your event receiver is doing something to cause the event receiver to re-fire. This could be caused by, for example, adding an item to the list as part of the OnItemAdding event. Or, more insidiously (and this I have actually seen, as opposed to the first example which is pretty easy to ...


1

The Event Receivers can only be Scope at Site or Web. http://msdn.microsoft.com/en-us/library/office/ms431081(v=office.14).aspx I believe you would need to use a Feature Stapler. For existing sites, you will need to activate the feature manually, either using the UI, or powershell loop that activates the feature everywhere. Then you need a feature ...



Only top voted, non community-wiki answers of a minimum length are eligible