开发者

Sharepoint 2010. Api. How to get field history?

开发者 https://www.devze.com 2023-02-11 16:42 出处:网络
I have SPListItem and some text field. I need in code get all versions of this field EX: version 1 \"hello rorld\"

I have SPListItem and some text field. I need in code get all versions of this field EX:

  1. version 1 "hello rorld"
  2. version 2 "hello world"
  3. version 3 "new application"
开发者_StackOverflow

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"]));
}
0

精彩评论

暂无评论...
验证码 换一张
取 消