I am trying to query Sharepoint 2010 to get all items of a list using the Client Object model.
One of the properties I try to retrieve is the DocumentId _dlc_DocId
If the field is present on the list, the query works correctly and returns the data I need, but if the field is not present because the document Id service is not enabled on the location, the query fails with a Server Exception with the following message:
Column '_dlc_DocId' does not exist. It may have been deleted by another user.
I can get around this by not narrowing the query and just returning all info from the list, but for performance reasons, this is not an acceptable solution.
Is there anyway to reliably handle the possibility that a property is not available for a particular list?