Query for Checked Out Items

Mar 6, 2015 at 10:37 PM
Edited Mar 6, 2015 at 10:37 PM
I understand the following CAML to retreive all checked-out items.
<Query>
  <Where>
  <IsNotNull>
    <FieldRef LookupId='TRUE' Name="CheckoutUser" />
    </IsNotNull>
  </Where>
</Query>
The following Camlex returns
Camlex.Query().Where(x => x["CheckoutUser"] != null).ToString(); ;

<Query>
  <Where>
  <IsNotNull>
    <FieldRef Name="CheckoutUser" />
    </IsNotNull>
  </Where>
</Query>
How does one get the LookupId="TRUE" portion that I need?

Thanks
Coordinator
Mar 9, 2015 at 10:28 PM
hello TimOdell,
unfortunately currently such possibility is not supported. I may only suggest use the following workaround:
string query = Camlex.Query().Where(x => x["CheckoutUser"] != null).ToString();
query = query.Replace("\"CheckoutUser\"", "LookupId='TRUE' \"CheckoutUser\"");