2

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

2

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>
0

use CAML builder..for the query and retrieve it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy