Get Published version of a List item Programmatically in Sharepoint
So, if you want to get a publish version of a document or a list item among various draft or un-approved(not published) versions you might do something like below
for (int index = 0; index < item.Versions.Count; index++)
{
if (item.Versions[index].Level == SPFileLevel.Published)
{
// Got the Item
}
}
for (int index = 0; index < item.Versions.Count; index++)
{
if (item.Versions[index].Level == SPFileLevel.Published)
{
// Got the Item
}
}
0 comments:
Post a Comment