SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to query all items in a meeting workspace list. I'm trying a query I think should work, but still only returns items specific to the instanceID. Is there a different flavor for client side caml?

Here's my JavaScript:

var camlQuery = new SP.CamlQuery();
var viewXML = "<View><Query><Where><IsNotNull><FieldRef Name=\'Registrant\' /></IsNotNull></Where></Query><QueryOptions><MeetingInstanceID>-1</MeetingInstanceID></QueryOptions></View>";

Thanks for any insight.

share|improve this question
up vote 1 down vote accepted

It turns out the QueryOptions element is not used in the CamlQuery object in the client object model. I eventually turned to SPServices. Here is the statement that did the trick for me:

  operation: "GetListItems",
  async: false,
  listName: "Registrants",
  CAMLViewFields: "<ViewFields><FieldRef Name=\'Registrant\' /></ViewFields>",
  CAMLQuery: "<Query><Where><Eq><FieldRef Name=\'Registrant\' LookupId=\'TRUE\'/><Value Type=\'Lookup\'>" + cUserId +"</Value></Eq></Where></Query>",
  CAMLQueryOptions: "<QueryOptions><MeetingInstanceID>-1</MeetingInstanceID></QueryOptions>",
  completefunc: function(xData,Status){
share|improve this answer

I don't think the <QueryOptions> element is supported in the Client Object Model.

For your requirement, if you want to get all the items in a list, you can use the follwing code:

var camlQuery = new SP.CamlQuery.CreateAllItemsQuery();

You don't need to specify the viewXml explicitly in this case.

share|improve this answer
Unfortunately, this doesn't seem to work with meeting workspaces. All queries are automatically filtered by InstanceID. I'm not really looking for an all items query, but just a way to defeat the instanceID filtering. It's looking like I'll have to use the Lists web service. – Blue Murphy Mar 14 '12 at 13:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.