Sharepoint event receiver itemupdating beforeproperties

After Properties[internal Name]); if (Before Value !

However, this post only focuses on the Before Properties and After Properties of the list item event receiver (SPItem Event Receiver). There is a difference between the behaviour of Before and After properties when dealing with document libraries versus when dealing with lists.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. In the link above you can go for a reference to find out which properties to use depending on what you are using a library or a list. Remember this, in most blogs it is written that you should use the Internal Name of the field, but for me it was different. When dealing with event receivers in Share Point custom code, we use the Before Properties and After Properties to get a hash table of properties consisting of string/value pairs that correspond to fields in the SPItem object before and after the event occurred respectively.

Leave a Reply