Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I want retrieve the currently published version of a document from a document library using CAML. Can anyone tell me how I can achieve this? I need it to get the currently published version irrespective of draft versions etc.

all the best

share|improve this question

2 Answers 2

use CAML builder..for the query and retrieve it

share|improve this answer

I don't have an environment where I can test this but have some suggestions for you.

Run a query to check if _IsCurrentVersion is TRUE. This may not relate to published versions but it's worth a try.

Or the following query may be enough:

<Where>
    <Contains>
        <FieldRef Name="_UIVersionString" />
        <Value Type="Text">.0</Value>
    </Contains>
</Where>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.