locked
CAML Query to Find Date Checked out RRS feed

  • Question

  • Hello,

    I need the CAML Query to find the DateTime Stamp when a document was checked out.

     

    Thanks

     

     

    Monday, September 19, 2011 5:20 PM

Answers

  • Hi Lugalzages,

    This is teh CAML query you need to detect if a particular document is checkout or not. The only thing you need to do is pass a <ViewFields>
          <FieldRef Name="Modified"/>
    </ViewFields>
    to see the date.

    CAML Query:

    <Query> 
       <Where>
          <And>
             <Eq>
                <FieldRef Name='FileLeafRef' />
                <Value Type='File'>NameOfLugalzagesiDocument.docx</Value>
             </Eq>
             <IsNotNull>
                <FieldRef Name='CheckoutUser' />
             </IsNotNull>
          </And>
       </Where>
    </Query>


    Gabriel Renom - Business Systems Analyst - Pannone LLP Blog:www.gabrielrenom.net
    • Proposed as answer by Ryan Mathieson Tuesday, September 20, 2011 9:34 AM
    • Edited by Gabriel Renom Tuesday, September 20, 2011 9:39 AM
    • Marked as answer by Lugalzagesi Thursday, October 6, 2011 12:28 PM
    Tuesday, September 20, 2011 8:59 AM