Itemupdating vs itemupdated
Using the synchronous handler guaranteed that the values would be set.
If this property exist in Before Properties and not in After Properties of SPItem Event Properties instance then it means that the callback is for item check-in event, else it is for event other than item check-in.While, in the Item Updating, user can cancel the event.Any ideas Thanks, Madhur I have not tried this, but I do need to do something similar.I was thinking that I could use some sort of cache or temp file in Item Updating to store the old values, then get those values in Item Updated.You should take a look at this Month's MSDN Magazine article on MOSS Event Handlers...We'll create a class called Disabled Events Scope: This class is simple and to the point.
We inherit SPItem Event Receiver and IDisposable, SPItem Event Receiver will give us access to the base properties in the event receiver and IDisposable will give us a Dispose method (which comes in handy in a moment).
Once I got things working with the Display Name of the field, I then noticed that I had a problem with the data disappearing after I would edit the properties of the document.
But this was only for Microsoft Office document types, things were fine for image files, text files, xml files.
This will most likely work for 99.9% of all implementations, but why take the risk.
There may be other code working some magic here as well, and by saving off the value and setting it back you do not interfere with anything else that may be going on. All we need to do is wrap our previous code in a Using statement: Viola! Update() fires, we are inside the scope of our Disabled Events Scope class which has disabled event firing.
Microsoft is conducting an online survey to understand your opinion of the Technet Web site.