Alternatively, if you were using an event handler to update another list, you might be able to disable the events on those.
(I’ve not tried this.) Finally, if you wanted to turn off or on event firing from your own code, without an event handler – like if you were creating a number of items from a console application, etc.
I’ve got an event handler on a Share Point list that’s fairly long running, and this then raised a question in the office – do these settings control event firing for the currently running event handler, or for the entire list? A quick check on twitter suggested the same – that it was the thread (thanks @Chris O_Brien).
The setting (Disable Event Firing in 2007 and Event Firing Enabled in 2010) must be for the current event handler; if it was the entire list there’d be all sorts of timing issues and weirdness, and a thousand developers would already have screamed in agony.
Instead of writing more paragraphs I can use tabular to explain, I think this will be easy to understand.
Each event method has a SPItem Event Properties parameter named properties.
I thought this would be pretty simple, but guess not. Do I need to somehow specify the name of the document library in addition to the name of the custom column that I am specifying? This is a Share Point 2007 environment, publishing site.
I have the following code, it deploys and activates just fine, but when I add a new document to the document library, nothing happens. And this is taken directly from another example from someone online who said it works.
Share Point reads these values from the event parameter and modifies the item accordingly when the actual operation runs (e.g.I have never used Http Context in event receivers till recently, so I was quite surprised when I got a Null Reference Exception, trying to access Http Context. Such simple class could resemble the following: Administration Allow Unsafe Updates Arc GIS ASP. In my opinion the best way in this case is to have a class that is derived from SPItem Event Receiver, manipulates Http Context and serves as a base class for all custom event receivers.I’m usually disappointed when writers employ oft-overused metaphors to describe a situation.With that in mind, Share Point 2010 is like a sea of icebergs – there is a lot going on under the surface that you may not notice until it’s too late.