Spitemeventreceiver itemupdating

I have a Doc Lib where I have some Metadata fields.There is one field called “My Choice” which is a Choice type field with 3 values – “Choice1”, “Choice2” and “Choice3”. Now there is another field called “My Value” of Text Type.As many of you know, event receivers are a great way to hook into various Share Point events.When working with events, you’ll quickly find that before (synchronous) and after (asynchronous) events exist, and the method suffix such as “ing” (e.g. Item Added) will tell you whether it gets invoked before or after the actual change is made. And, as you get deeper, you’ll even find that you can extract the before and after state of the change.For example, you can hook into the Item Updating event for a document library and prevent a user from changing a certain column.The code might look like this: When they say “not available for post events on list items”, do they mean after events (like Item Updated, Item Deleted, etc)?When working with events, you’ll quickly find that before (synchronous) and after (asynchronous) events exist, and the method suffix such as “ing” (e.g. Item Added) will tell you whether it gets invoked before or after the actual change is made. Comparison table of Before and After properties in SPEvent Receiver for list and document library No value means that column value in the hash table was not available.

From the list table, you can see if we hook into the Item Updating event, we can compare the current item’s value (properties. Post 1 : Synergy Online In this post Randy Williams, provided clear explanation about this.Some basic details about Event Receivers got from this post Event receivers are a great way to hook into various Share Point events.My requirement is, if user selects Choice1 in the My Choice field, then the My Value field cannot remain blank.This is not possible OOB, but can be done using a custom Item Updating event handler.But a note claims this was only an issue for beta versions?

214

Leave a Reply