CAML queries issues
27.07.2007 Пятница 17:36
Software: Microsoft SharePoint
Got this message when trying to access a SharePoint list in C# code using CAML query.
One or more field types are not installed properly. Go to the list settings page to delete these fields.
The problem was that names of fields that are to be used in CAML queries are SharePoint internal ones. Not what you see in any list configuration screens. Quite often internal names differ from displayed ones. For example, if displayed name contains a space (e.g. "Tab Order"), internal name will have "_x0020_" in place of the space character ("Tab_x0020_Order"). Another reason why internal and displayed names differ is that when you rename a field, its internal name doesn't change. Period.
To get to know what the internal name of a field is, go to its edit screen and do the View Source thing in browser. Somewhere in the code (usually close to the opening
tag) there's internal name. Also internal name, though somewhat altered, can be found in the URL of the field edit screen. It's altered because "_"'s are replaced with their encoded version. For example, this part of the URL:
... Field=Key%5Fx0020%5FOrder
really means that internal name of the field is "Key_x0020_Order".