Scenario:
You have some kind of SharePoint List that is populated with data from some source. You require that some of the fields are read-only in SharePoint so that users cannot change them. You also have versioning turned on to track any updates to the list items whether it comes from the importing process or user changes.
Issue:
If the fields are marked as read-only, SharePoint will not display information about these fields on the version history page (versions.aspx) even if the values had changed. There is no option to change this in the web UI.

This list item has 50+ fields but is not showing fields that are read-only.
Solution:
In order to display the versioned values of fields that are read only, you have to change the SPField.ShowInVersionHistory property to True.

Now the item's version history will show the changed values for all fields even if they are read-only.
Powershell Script
Here’s a Powershell script snippet that can change this property in a jiffy assuming you have all the fields in a column group.
[System.reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") $site = new-object Microsoft.SharePoint.SPSite("http://sharepointsite") $web = $site.rootweb $list = $web.Lists["Your List"] $fields = $list.Fields $count = 0 for($x = 0; $x -le ($fields.Count-1); $x++) { $field = $fields[$x] if($field.Group -eq "Custom List Columns" ) { Write-Host $field.Title $field.ShowInVersionHistory = 1 $field.Update() $count++ } } $web.Dispose() $site.Dispose() Write-Host "Updated $count fields"
Or you can use this tool using web services to change field properties
http://www.codeplex.com/SpiralOut
Or you can use this tool to run powershell scripts on SharePoint remotely: http://sppowershellconsole.codeplex.com
How can we do this programmatically?
Hey Sinisa, the script above could be used as pseudo code to be replaced with your choice of C# or VB.NET
On my side, I did it programmatically and I found this page because Im searching for a problem that we call see an exemple right in this page.
If we look at the exemple in the solution, we can see that the page ended with “(more…)
The problem is that theres no way to see more! Its not a link, you cannot click on it, so, what you see is what you get… I found no way to see more.
The other problem is with large data. The data is write on a single line and, at the end of line, you have “…” and the text is cut. Again, I found no way to see the entire data.
Maybe its just how SharePoint show version and theres nothing that can be done, maybe (and its my hope) it has a parameter somewhere that can change this.
Personnaly, I look every properties and method in the object SPSite, SPWeb, SPList and none do this.
If its just the way SharePoint works of if its possible to change it, please answer me.
Great!! I have been looking for why this was happening…!!
I seems to have picked up this issue when moving a site from one web-app to another…
Any reason this might have happened, I have more sites to move….
We just launched an Online tool to export SharePoint Version History in bulk. You can select the fields from a list, the results of which are sent to your inbox in Excel format. You can rerun these jobs which are saved in One Tap! Check it out here: http://sharepointversionhistory.com and let me know what you think.