title: Object doesn't support set_viewXML
body: <p>I am using SharePoint 2013 and attempting to filter a list by a Lookup choice field.</p>
  
  <p>After searching around and attempting a variety of ways of inserting the query XML, I have the following code:</p>
  
  <pre><code>function getListItems(listName, viewTitle){
      var myClientContext = new SP.ClientContext.get_current();
      var oWebsite = myClientContext.get_web();
      var oList = oWebsite.get_lists().getByTitle(listName);
  
      var camlQuery = new SP.CamlQuery();
      var q = '&lt;View&gt;&lt;Query&gt;&lt;Where&gt;' +
          '&lt;Eq&gt;' +
            '&lt;FieldRef Name="SignLocationsList" LookupId="true" /&gt;' +
            '&lt;Value Type="Lookup"&gt;HQ&lt;/Value&gt;' +
          '&lt;/Eq&gt;' +
          '&lt;/Where&gt;&lt;/Query&gt;&lt;/View&gt;';
      camlQuery.set_viewXML(q);
  
      // No specific query at this time
      this.collListItem = oList.getItems(camlQuery); 
  
      myClientContext.load(collListItem,'Include(Id,Title,Posting_x0020_Date_x0020_Planned,Removal_x0020_Date_x0020_Planned,SignRemoved,AttachmentFiles,SignLocationsList');
      myClientContext.executeQueryAsync(getItemsSuccess, getItemsFail);
  }
  </code></pre>
  
  <p>However, I still end up with the error : </p>
  
  <blockquote>
    <p>Error: Object doesn't support property or method 'set_viewXML'</p>
  </blockquote>
  
  <p>Without adding the query portion, I am able to see the entire list and display it the way that I need to.  It is only when attempting to add the query XML that I end up with the error. </p>