One or more field types are not installed properly. Go to the list settings page to delete these fields

kevin picture kevin · Dec 11, 2012 · Viewed 66.7k times · Source
CamlQuery query = new CamlQuery();
query.ViewXml = @"<View>"
    + "<Query>"
    + "<Where><Eq><FieldRef Name='Name' /><Value Type='Text'>"
    + fileName
    + "</Value>"
    + "</Eq>"
    + "</Where>"
    + "</Query>"
    + "</View>";
ListItemCollection item = list.GetItems(query);
clientContext.Load(item);
clientContext.ExecuteQuery();

This query gave me the error One or more field types are not installed properly. Go to the list settings page to delete these fields.

If I use <Where><Eq><FieldRef Name='Title' /><Value Type='Text'> instead of Name , it's OK.

What's wrong with it? Name is there in the list.

Answer

Brian Beech picture Brian Beech · Jan 28, 2013

If you rename a column that was defined, the internal name DOES NOT get updated. For instance, you create a custom list, it has the column 'Title' by default. If you change that column to, say, 'userId', the internal name for that column is still 'Title'.