Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Using server-side code I can access List Item version history using SPListItem.Versions.

Is there a way to programmatically access the same information from the client?

I am happy to use either the Client Object Model, SharePoint Web Services or any other mechanism.

Note:

  1. I am trying to access this information remotely - please don't answer with server-side code.
  2. I am not trying to access FileVersionHistory - I'm after history for the ListItem itself.
  3. Custom web service is not an option.
share|improve this question
    
i wanna ask you about this topic, can i use method as GetVersionCollection() to get field that changed and in which version this field changed. GetVersionCollection() return value of data changed between versions for specified field, but how can i get the value changed with the number of version to this field. Thanks. –  leen Mar 21 '12 at 8:52
add comment

1 Answer

up vote 5 down vote accepted

Take a look at my answer provided to very similar question:

Get meta data from a previous version of a document through webservice in MOSS 2007

Using web service and Lists.GetVersionCollection Method is (as far as I know) only available option. So you need to call it for each field of your item.

Client object model is not an option.

UPDATED

To get all versions of version field you just need to call GetVersionCollection method on version field by passing it's internal name _UIVersionString

Simple code snippet:

ListProxy.Lists lists = new Lists();
lists.UseDefaultCredentials = true;
XmlNode versions = lists.GetVersionCollection("{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx}", 
                                                       "n", "_UIVersionString");
foreach(XmlNode version in versions.ChildNodes)
{
    Console.WriteLine(version.Attributes["_UIVersionString"].Value);
}
share|improve this answer
    
@GregSansom: It provides. Take a look at my updated answer. –  Vedran Rasol Jan 21 '12 at 22:56
    
That is your choice and it really depends on your specific application needs. I would not be comfortable with HTML parsing like you suggested. Anyway it is strange that better alternative doesn't exist. –  Vedran Rasol Jan 23 '12 at 8:31
    
I was breaking my head all day to find a solution through COM. It is surprising to know that MSFT has not provided that option using COM. You dead straight answer helped me to save further time I was about to waste in this. –  NLV Oct 16 '13 at 13:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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