I'm wanting to display the version history of a particular column in an email. Anyone tried this before?
Hi Dallas,
I've never done this but I would start using the GetVersionCollection method of SharePoints ootb Lists.asmx web service.
As parameters you have to provide the List ID, Item ID and Field Name. As a result you will receive something like this:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetVersionCollectionResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<GetVersionCollectionResult>
<Versions>
<Version Title="ccc" Modified="2016-05-03T08:43:41Z" Editor="1;#Johnny Developer,#i:0#.w|devdeveloper,#developer@sp.dev,#,#Johnny Developer" />
<Version Title="bbb" Modified="2016-05-03T08:43:22Z" Editor="1;#Johnny Developer,#i:0#.w|devdeveloper,#developer@sp.dev,#,#Johnny Developer" />
<Version Title="aaa" Modified="2016-03-22T12:48:57Z" Editor="1;#Johnny Developer,#i:0#.w|devdeveloper,#developer@sp.dev,#,#Johnny Developer" />
</Versions>
</GetVersionCollectionResult>
</GetVersionCollectionResponse>
</soap:Body>
</soap:Envelope>
You would probably have to extract the relevant information using XPath and/or a Regex but it should provide all the information you need.
Cheers
Philipp
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.