Searching for In-Place Records using CAML

Just a quick note to all you records management junkies out there.  Here’s a question I’m seeing a lot of.  “Can I write a CAML query to locate all of the documents that have been declared as in-place records?”

The answer is yes.  It’s actually quite simple.  There is a new field called “Declared Record” that holds the date on which an item was declared as a record.  If that field is null, then the item was not declared.  The only trick is that you have to use the internal field name, which is “_vti_ItemDeclaredRecord”.

Here is a screenshot of a document library containing expense reports for an accounting department.  Notice that there are 2 records declared, the “Automobile Expenses” and “Expense Claim Form” documents.

SNAGHTML6e56af6

Here is another shot of a simple query in CAML Query Builder that finds all of the declared record items in the library:

image

Finally, here is the result of executing the query:

image

So, there you have it.  Easy as pie.

, , ,

Trackbacks/Pingbacks

  1. SharePoint Daily » Blog Archive » Do You Really Use SharePoint?; Enterprization of Consumer Apps; Mozilla & Microsoft vs. Google - November 1, 2011

    [...] Searching for In-Place Records Using CAML (John F. Holliday) Just a quick note to all you records management junkies out there.  Here’s a question I’m seeing a lot of.  “Can I write a CAML query to locate all of the documents that have been declared as in-place records?” The answer is yes.  It’s actually quite simple.  There is a new field called “Declared Record” that holds the date on which an item was declared as a record.  If that field is null, then the item was not declared.  The only trick is that you have to use the internal field name, which is “_vti_ItemDeclaredRecord”. [...]

  2. Do You Really Use SharePoint?; Enterprization of Consumer Apps; Mozilla & Microsoft vs. Google - SharePoint Daily - Bamboo Nation - November 1, 2011

    [...] Searching for In-Place Records Using CAML (John F. Holliday)Just a quick note to all you records management junkies out there.  Here’s a question I’m seeing a lot of.  “Can I write a CAML query to locate all of the documents that have been declared as in-place records?” The answer is yes.  It’s actually quite simple.  There is a new field called “Declared Record” that holds the date on which an item was declared as a record.  If that field is null, then the item was not declared.  The only trick is that you have to use the internal field name, which is “_vti_ItemDeclaredRecord”. [...]

  3. Sharepoint Updates November-01-2011 | SDavara's Sharepoint Knowledge Center - November 2, 2011

    [...] Searching for In-Place Records using CAML [...]

Leave a Reply