I don’t mean that it’s largest and most luxurious application every written, but rather that you may be cruising headlong into a nasty rendezvous with an iceberg that could deal a severe blow to your project.
We may never know about all of the dangers lurking out there, but today we’re going to cover at least one danger you may encounter while writing event receivers – an annoying issue with the Item Updating and Item Updated events firing twice.
Item Event Receivers derive from the SPItem Event Receiver class and have a number of methods that can be overridden to respond to various events: As you look through this list, you should notice that events have two types of endings: WARNING: One major gotcha you should know about the SPItem Event Receiver class is that while you can implement multiple list item event handlers in a single class, Share Point instantiates a new instance of that class for each individual event it needs to handle.
Sometimes that is the most exciting way to learn, but for those less adventurous I will briefly cover the topic here.
You can think of an item event receiver like a database trigger: it has different events that fire during the course of Share Point running an operation on a list item (or document item).
I should also point out that I know the difference between a metaphor and simile in case that was bothering you from the opening sentence.
I am nothing if not a masterful linguist after a beer or two or more.
Hopefully you know about item event receiver if you are having problems with them firing twice.
Developing a Sharepoint application would have all the fun of a video game, if only you had infinite lives.Dangers lurk hidden out there which, if you run into them, can be a blow to your project and waste a great deal of time.