title: Dynamics CRM SDK filter query on custom field
body: <p>I am trying to pull items from the salesorder entity into my WPF Application (C#)
  I have created a custom field in the crm called new_xero and published. This is a two-option field. I have 4 orders, 2 with nothing set for this field, one with 'no' selected and one with 'yes' selected.</p>
  
  <p>I have the following code:</p>
  
  <pre><code>QueryExpression qeLocations = new QueryExpression("salesorder");
  
          string[] cols = { "salesorderid", "name" };
          qeLocations.ColumnSet = new ColumnSet(cols);
  
  
          var locations = this.OrgService.RetrieveMultiple(qeLocations);
  
          listBox1.ItemsSource = (from location in locations.Entities
                                  where location.GetAttributeValue&lt;string&gt;("new_xero") == "false"
                                  //where (bool)location["new_xero"] == false
                                      select new
                                      {
                                          Name = location["name"],
                                          LocationID = location["salesorderid"]
                                      }).Take(5);
  </code></pre>
  
  <p>It seems that everything I try to do to the line <code>where location.GetAttributeValue&lt;string&gt;("new_xero") == "false"</code> I can't filter to only those where the option is set to 'no'
  I have tried int filtering against 0, string against 'false', 'False', 'No', 'no' but can't seem to find the right solution.</p>
  
  <p>Cheers</p>