Itemupdating before properties afterproperties

It appears the title column value is available in After Properties, only you have to use the “vti_title” name for it! ) In my book, this is a bug, and an undocumented one at the very least…

I hope someone fixes it soon, but for now it is one of those things seasoned Share Point sharks need to remember.

In debugging, I checked the values at Item Adding, Item Added, Item Updating, and Item Updated.

Everything looked as it should through Item Updating, but somewhere in between Item Updating and Item Updated, the data was lost, and my values were set to empty strings.

This whole architecture of hashtables of properties and trying to match up values seems to me to be pretty fragile, and I’m not sure why Microsoft went this way.

To solve this, I do the heavy lifting code in Item Adding, and then simply do a resetting of the value in Item Added to ensure that it sticks.

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.

tl;dr: If you have trouble with stopping the updated-event from firing, compare what you want to change in the before Properties and after Properties.

If they are different, you should go ahead with your update, otherwise not.

Leave a Reply

  1. dating relationships love pictures video 03-Nov-2019 17:29

    I get stopped by the police every couple of weeks People say to me, "Put a shirt on, or a jumper." But I've never changed my fashion sense and I still go out with a cap and a hoodie on, and because of that I expect to be stopped.

  2. Free java cyber chatrooms 05-Sep-2019 11:14

    When one of these particles strikes an atom it can dislodge protons and/or neutrons from that atom, producing a different element or a different isotope of the original element.

  3. bengali dating website 11-Oct-2019 04:03

    We photographed profressional models along with real girls who just modeled for fun or for some extra funds while going to college or working on their career.