Does anyone know how to programmatically determine if any non-system fields have changed between ListItem versions? I realize that I could iterate through the fields between each version and if I see a change occurs (then keep the version otherwise delete it), but this seems very expensive to do.

When you click on version history for a listitem, you get a nice summary of changes between versions. Is this code/SQL accessible to the developer?


If you take closer look at versions.aspx (\14\TEMPLATE\LAYOUTS) you will notice that 'nice summary' is created by iterating over item versions (from line 311 to 357).

My guess is if versions.aspx uses iteration to retrieve field changes then this is the only option available.

Edited: To be completely correct: It is not the only option. You can probably execute query directly on content database but here you have nice explanation why you really don't want to do this:



Not sure this will solve your problem completely, but may help a bit. To see the SQL being executed, you could enable and use the developer dashboard.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.