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
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
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>