foreign dating service reviews - Itemupdating properties afterproperties null

by  |  03-Feb-2020 14:40

So I'm trying to accomplish this kind of functionality on my Share Point 2010 list: I have a field of type choice in my list, which has 7 values and i want users not to be able to change the value of that field from values 2,3,4,5,6,7 to value 1.I've written an event receiver for that list, here's my code: Use Item Updating event and then afterproperties contains changed value and List Item contains original value of a field.Few new event handlers are added for site, web, list, listitems etc.

itemupdating properties afterproperties null-33

Do NOT try to manually get the list item in code and update a property on it because the optimistic locking mechanism in Share Point may throw an error later on when the operation associated with the event to which you are responding attempts to complete.

Although asynchronous events expose a SPItem Event Properties parameter named properties just like their synchronous counterparts, remember that the operation has already completed so you cannot modify anything in the properties parameter (well, you can, but it doesn’t do anything).

A common usage for Sharepoint is meeting room bookings.

This article will provide one way of elegantly handling this scenario with some simple configuration but then we'll take it a step further by getting under the hood of WSS and adding some validation so that a room can not be double booked.

Additionally, the properties parameter may not be populated with information that you would tend to expect to be present.

Community Discussion