Note that there are some explanatory texts on larger screens.

plurals
  1. PODynamics CRM 2011 SOAP RetrieveMultiple query ignoring criteria
    text
    copied!<p>I am connecting to Dynamics CRM 2011 Online using PHP and SOAP and have come across an issue. The following RetrieveMultiple ignores my criteria and returns all records.</p> <p>All I want is any contacts that have 'test@test.com' as their email address.</p> <p>Could someone tell me what is wrong with my Criteria/Condition below?</p> <p>Thanks!</p> <pre><code>&lt;RetrieveMultiple xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services"&gt; &lt;query xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" i:type="b:QueryExpression"&gt; &lt;b:ColumnSet&gt; &lt;b:AllColumns&gt;false&lt;/b:AllColumns&gt; &lt;b:Columns xmlns:c="http://schemas.microsoft.com/2003/10/Serialization/Arrays"&gt; &lt;c:string&gt;firstname&lt;/c:string&gt; &lt;/b:Columns&gt; &lt;/b:ColumnSet&gt; &lt;b:Criteria&gt; &lt;b:Conditions&gt; &lt;b:Condition&gt; &lt;b:AttributeName&gt;emailaddress1&lt;/b:AttributeName&gt; &lt;b:Operator&gt;Equal&lt;/b:Operator&gt; &lt;b:Values&gt; &lt;b:Value i:type="xsd:string"&gt;test@test.com&lt;/b:Value&gt; &lt;/b:Values&gt; &lt;/b:Condition&gt; &lt;/b:Conditions&gt; &lt;b:FilterOperator&gt;And&lt;/b:FilterOperator&gt; &lt;b:Filters /&gt; &lt;/b:Criteria&gt; &lt;b:Distinct&gt;false&lt;/b:Distinct&gt; &lt;b:EntityName&gt;contact&lt;/b:EntityName&gt; &lt;b:LinkEntities /&gt; &lt;b:PageInfo&gt; &lt;b:Count&gt;250&lt;/b:Count&gt; &lt;b:PageNumber&gt;1&lt;/b:PageNumber&gt; &lt;b:PagingCookie i:nil="true" /&gt; &lt;b:ReturnTotalRecordCount&gt;false&lt;/b:ReturnTotalRecordCount&gt; &lt;/b:PageInfo&gt; &lt;/query&gt; &lt;/RetrieveMultiple&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload