Fired event itemupdating which wasn

The first time the Item Updating and Item Updated events fire it is in response to the document properties changing.The second time they fire it is in response to the document being checked in.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.

If the user opts to cancel, then only the Item Adding and Item Added events will have fired and the document will be left in a checked out state.

I had already covered all the basic things such as: I even went as far as completely emptying the body of the handler to see that in fact the event was firing twice.

As with any problem, I always try to resolve it through the process of elimination by first isolating the core issue into a test project and therefore out of the primary project I’m experiencing it in because sometimes you can’t see the forest because of the trees. After creating the simple project, the problem was still there. The event wasn’t firing twice for the same list, it was firing for ALL Lists. I took another look at my event receiver I had added via Visual Studio to the project. Yes, I had left the file for the Event Receiver there, and therefore when the feature was activated for the project, the receiver got associated to ALL lists on the site.

To understand why this is happening, let’s first look at what happens when the user adds a document to the library when the Require Check Out option is disabled: So the net result of this is that the document is uploaded and the Item Adding and Item Added events have fired, which is pretty much what you would expect.

Next, let’s look at what happens when the user adds a document when the Require Check Out option is enabled.

Leave a Reply

  1. Free older women webcams 07-Feb-2020 15:23

    Since a punt has no keel, it draws only a few inches even when fully laden; this makes it very manoeuvrable and suitable for shallow water.

  2. Free no signup adult meeting 02-Jul-2020 00:49

    With risk comes autonomy.”That last part really resonated with me.

  3. gridview rowupdating e cancel 13-Feb-2020 01:23

    While the genre started in the 1980s, arguably the first dating sim to make it big is Tokimeki Memorial, first released for the PC in 1994. Due to its popularity, the game been remade multiple times (Tokimeki Memorial: Forever With You, Tokimeki Memorial: Densetsu no Ki no Shita de, etc.) and has been ported to multiple systems (Game Boy Color, Play Station, Super Famicom, mobile phones, PSP).