I was querying a SharePoint library, trying to retrieve some file attributes. Apparently some things like FileType and Date are not supported, even though those fields are listed as a built in field. How do I know what is supported and what isn't? It's a runtime error that I'd like to avoid.
private static void ListDocuments(ClientContext clientContext)
{
List list = clientContext.Web.Lists.GetByTitle("My Documents");
CamlQuery camlQuery = new CamlQuery();
camlQuery.ViewXml =
@"<View>
<Query/>
<RowLimit>100</RowLimit>
</View>";
ListItemCollection listItems = list.GetItems(camlQuery);
clientContext.Load(
listItems,
items => items
.Include(
// how do I know what is legal here?
item => item["LinkFilename"],
item => item["FileRef"],
item => item["File_x0020_Size"],
item => item["File_x0020_Type"],
item => item["Modified"]
));
}