Detailview itemupdating

Posted by / 17-Sep-2019 10:22

Detailview itemupdating

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.Also note: the Item Updating and Item Updated events that fire in response to the properties being edited from the dialog will always occur, even if the user is not entering or changing any of the values.

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).

Following is the code for a base class that adds a new parameter to the Item Updating and Item Updated methods that specifies whether the event was called as a result of a check-in operation.

These methods are just like the Item Updating and Item Updated methods in the SPItem Event Receiver class, but they have an additional Boolean parameter named is Check In that indicates whether or not the event is being raised as result of a check-in operation.

Hopefully you know about item event receiver if you are having problems with them firing twice.

If not, kudos to you for tackling the object model with reckless abandon.

detailview itemupdating-2detailview itemupdating-27detailview itemupdating-2

So the double-event firing isn’t a bug, it’s just a result of the automatic check-in that occurs when you first add a document to a document library.

One thought on “detailview itemupdating”