Useless SharePoint Error – SPQuery / Caml
Came across this error while trying to execute a Caml query through the SPQuery object:
One or more field types are not installed properly. Go to the list settings page to delete these fields.
Don’t believe it, you don’t need to delete any fields. You more than likely have a misspelled column or a column name that has a different internal name than what is publicly visible. For example, a default SharePoint calendar has a column field called “End Time”; however if you include the space within your query, you’ll get the error above. In this case, the internal name is really “EndDate”. Also look for column fields that have been renamed. Sometimes if you define a column, then later change its name – the internal name will still remain the same.
How are you supposed to know what the internal field name is? Well, here’s a tried and true method. Go to the list you are trying to query from, then click Settings -> List Settings. Scroll down to where all the Columns are defined. Click on the one in question, which will take you to the FldEdit.aspx page. Within your address bar, notice the querystring param Field. This references the internal field name for the column which you should also use in your queries.
1 Comment
Comments RSS
TrackBack Identifier URI
Leave a comment
Nice !!!!!!!!
SpQuery and CAML in Sharepoint, it is simple.
Try this too,
SpQuery and CAML in Sharepoint
Comment by sara on October 6, 2009 12:29 pm