Sharepoint 2010. Api. How to get field history?
I have SPListItem and some text field. I need in code get all versions of this field EX:
- version 1 "hello rorld"
- version 2 "hello world"
- version 3 "new application"
Any examples how to do that?
Try this:
foreach (SPListItemVersion version in item.Versions)
{
Console.WriteLine(string.Format(
"{0}. version {0} \"{1}\"",
version.VersionId, version["this field"]));
}
精彩评论