There's a weird thing happening with my Windows application. I have created a Sharepoint utility to automate the creation of content-types and site-columns. At a point where I try to get my available fields, I get this error:

An unhandled exception of type 'Microsoft.SharePoint.Client.ServerException' occurred in Microsoft.SharePoint.Client.Runtime.dll Additional information: Requested value 'CheckBoxes' was not found.

It is throwing an exception at:

ClientContext clientContxt = new ClientContext(clientContext.Url);
        clientContext.Credentials = clientContext.Credentials;
        Web web = clientContext.Web;

        clientContext.Load(web, w => w.AvailableFields);
        clientContext.ExecuteQuery(); //**exception thrown here**

Kindly please suggest what is wrong here?

  • If you access AvailableFields property of the web, and list the field using the server-side API, don't you have any problems? Is there a field called CheckBoxes listed in this case? What if you try using simply the Fields property instead of AvailableFields? See this post for further info on the difference: johanleino.wordpress.com/2011/03/07/… – pholpar Feb 18 '15 at 7:06
  • @pholpar, I want to get all the available site-columns. If I'm trying to retrieve all the available Content-Types, there is no issue but it throws this exception for site-columns. – Abhishek Feb 18 '15 at 9:21
  • Have you tried that via the server side API as suggested? Or via REST (yourserver/_api/web/AvailableFields) It would be useful to know if it is an issue with the client side OM or a general one, due to (for example) a configuration problem in your system. – pholpar Feb 18 '15 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.