Hi, I have created a 2 custom lists and I would like to update the content inone based on changes done on list2.
To achieve this I'll will need cath newand old values on the list Item which is being updated, to then find itsequivalent in list2 and proceed to update.
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.
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.
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.If the name isn’t changed, the changes are saved to the Share Point list.Before you can deploy the event receiver you have to change the file to bind the Update Adding event receiver to all custom lists.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....
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.I still do a lot of work for my previous employer Recomatics, a company located in Destelbergen near Ghent.