Itemupdating event

Mainly my issue is that no matter which of the 2 events I override the countof the After Properties and Before Properties hash Tables is always 0.... After Properties is only available in the Item Updated event. Before Properties is only available in the Item Updating event. you're getting a count of zero because you're querying the wrong one in each method.

Since the Before Properties and the After Properties are never available at the same time, in order to accomplish your task you will have to rig some logic to cache the Before Properties during the Item Adding event and then retrieve them during the Item Added event..make sure you are talking about the SAME item in both cases.

This event occurs before the data is saved to the Share Point list.

To check if the name of the planet is changed, you can compare the Title column before the changes with the Title of the changed item.

Share Point has a built-in infrastructure that allows certain SP objects to raise events that can be handled by custom code.

These events could be web events (Web Adding, Web Provisioned, Web Deleting etc), feature events (Feature Activated, Feature Deactivated etc) or most popularly, list item events (Item Updated, Item Updating, Item Added etc).

New value means that the correct value for the column was available.

Changed value means that the correct updated value was available.

This walkthrough is based on the first one where I have a custom list with planets of our solar system.

For documents, Before and After properties are guaranteed for post events, such as Item Updated, but Before properties are not available for post events on list items.

For both lists and libraries: No value means that column value in the hash table was not available.

I have already attached list1 to aevent handler but I cannot recover both values to complete my task....

If Ioverride the Item Updating event I'm able to get the old value but not the newone, and when I override the Item Updated I can get only the new value. Thanks in advancepublic override void Item Updated(SPItem Event Properties properties)I also tried this :public override void Item Updating(SPItem Event Properties properties) In the interest of completeness, I'm going to post an answer to this question, even though the question was months ago...properties.

Leave a Reply