我正在使用 PHP 和 SOAP 连接到 Dynamics CRM 2011 Online,但遇到了问题。以下 RetrieveMultiple 忽略我的条件并返回所有记录。
我想要的只是任何以“test@test.com”作为电子邮件地址的联系人。
有人可以告诉我下面的标准/条件有什么问题吗?
谢谢!
<RetrieveMultiple xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services">
<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">
<b:ColumnSet>
<b:AllColumns>false</b:AllColumns>
<b:Columns xmlns:c="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<c:string>firstname</c:string>
</b:Columns>
</b:ColumnSet>
<b:Criteria>
<b:Conditions>
<b:Condition>
<b:AttributeName>emailaddress1</b:AttributeName>
<b:Operator>Equal</b:Operator>
<b:Values>
<b:Value i:type="xsd:string">test@test.com</b:Value>
</b:Values>
</b:Condition>
</b:Conditions>
<b:FilterOperator>And</b:FilterOperator>
<b:Filters />
</b:Criteria>
<b:Distinct>false</b:Distinct>
<b:EntityName>contact</b:EntityName>
<b:LinkEntities />
<b:PageInfo>
<b:Count>250</b:Count>
<b:PageNumber>1</b:PageNumber>
<b:PagingCookie i:nil="true" />
<b:ReturnTotalRecordCount>false</b:ReturnTotalRecordCount>
</b:PageInfo>
</query>
</RetrieveMultiple>