Posted by: R Manimaran | October 19, 2010

Get/Find all Checked-out documents from a document Library using CAML

Get/Find all Checked-out documents from a document Library using CAML

Suppose we have a document library with multiple folders and contains some files inside. Some of the documents are checked-out by the current user and some of them are checked out by other users.

I need to get all the documents details which are in checked-out state.

Here is the CAML Query

<Where>

<IsNotNull>

<FieldRef Name=’CheckoutUser’ />

</IsNotNull>

</Where>

Suppose if you want to get all the document that are checked out by the current user then use the following Query.

<Where>

<And>

<IsNotNull>

<FieldRef Name=’CheckoutUser’ />

</IsNotNull>

<Eq>

<FieldRef Name=’CheckoutUser’ />

<Value Type=’Integer’>

<UserID Type=’Integer’ />

</Value>

</Eq>

</And>

</Where>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: