Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Proper way to get the latest published Major version of Document

$
0
0

Hi,

I have a Document Library which has "Create major and minor (draft) versions" enabled.

Now, from my C# application I need to fetch the latest major version of a document from that library.

What is the proper way to do this?

As of right now, I do the following:

return sourceFolder.Files["documentName.docx"]; // sourceFolder is a SPFolder object

Now, I don't trust that this will always give me the latest published major version of the document. Or am I wrong? If I'm wrong, how should I do this?

Thanks!


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>