He wants to store the prior values in some other fields on the item when the item is updated (yes, I know versioning would be easier, but I'm at his mercy here).
Within an event receiver, you have two hash tables available to you within SPItem Event Properties, Before Properties, and After Properties.Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange A user has a list that has a couple fields that are often updated.Original value means that the correct original value was available.Now let’s say we want to hook into the Item Updating event and prevent a user from changing a certain column.
Search for itemupdating properties:
Even when hard-coding the values, the code runs successfully but the values aren't saved. Allow Unsafe Updates = True current Item("Prior Price") = 5.25 current Item. Web, and do not dispose of it (do not put inside a block). Allow Unsafe Updates unless you are specifically trying to update an item inside a GET request. Allow Unsafe Updates lightly as it exists to protect against vulnerabilities.