This sounds like something easy but I some how can't find an answer. I am trying to get an SPItem from a SharePoint list (the item is a folder) so that I can set certain permissions on the folder using c#. What I have done so fare is:
SPQuery query = new SPQuery(); query.Query = "<Where><Eq><FieldRef Name=\"Name\" /><Value Type=\"Text\">Folder Name</Value></Eq></Where>"; query.RowLimit = 1; query.ViewFields = ""; SPListItemCollection items = documentList.GetItems(query); SPListItem custConfFolder = items
However when the code reaches the last line (items) the following SPException is thrown:
"One or more field types are not installed properly. Go to the list settings page to delete these fields."
In the list the field Name exists and is given as "Folder Name". Do I need to use the internal name of the field if so where can I find the internal name? or is there a completely different way to retrieve this list item?
Thank a lot for any clues