SharePoint: CAML query on boolean field

As seen in the post CAML and Querying Boolean Fields, if you need to query a boolean field, don't cast it as boolean

<Value Type='Boolean'>TRUE</Value>

but insted cast it as integer:

<Value Type='Integer'>1</Value>

If you need help in creating CAML queries, you can use the tool CAML.NET, that helps creating CAML queries in a type-safe way.

Add comment