php - Dynamics CRM 2011 SOAP RetrieveMultiple query ignoring criteria -


i connecting dynamics crm 2011 online using php , soap , have come across issue. following retrievemultiple ignores criteria , returns records.

all want contacts have 'test@test.com' email address.

could tell me wrong criteria/condition below?

thanks!

<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> 

try use following soap format:

    <s:envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">   <s:body>     <execute xmlns="http://schemas.microsoft.com/xrm/2011/contracts/services" xmlns:i="http://www.w3.org/2001/xmlschema-instance">       <request i:type="a:retrievemultiplerequest" xmlns:a="http://schemas.microsoft.com/xrm/2011/contracts">         <a:parameters xmlns:b="http://schemas.datacontract.org/2004/07/system.collections.generic">           <a:keyvaluepairofstringanytype>             <b:key>query</b:key>             <b:value i:type="a:queryexpression">               <a:columnset>                 <a:allcolumns>false</a:allcolumns>                 <a:columns xmlns:c="http://schemas.microsoft.com/2003/10/serialization/arrays">                   <c:string>firstname</c:string>                 </a:columns>               </a:columnset>               <a:criteria>                 <a:conditions>                   <a:conditionexpression>                     <a:attributename>emailaddress1</a:attributename>                     <a:operator>equal</a:operator>                     <a:values xmlns:c="http://schemas.microsoft.com/2003/10/serialization/arrays">                       <c:anytype i:type="d:string" xmlns:d="http://www.w3.org/2001/xmlschema">abc@a.com</c:anytype>                     </a:values>                   </a:conditionexpression>                 </a:conditions>                 <a:filteroperator>and</a:filteroperator>                 <a:filters />                 <a:isquickfindfilter>false</a:isquickfindfilter>               </a:criteria>               <a:distinct>false</a:distinct>               <a:entityname>contact</a:entityname>               <a:linkentities />               <a:orders />               <a:pageinfo>                 <a:count>0</a:count>                 <a:pagenumber>0</a:pagenumber>                 <a:pagingcookie i:nil="true" />                 <a:returntotalrecordcount>false</a:returntotalrecordcount>               </a:pageinfo>               <a:nolock>false</a:nolock>             </b:value>           </a:keyvaluepairofstringanytype>         </a:parameters>         <a:requestid i:nil="true" />         <a:requestname>retrievemultiple</a:requestname>       </request>     </execute>   </s:body>         </s:envelope> 

btw. can use soaplogger located in sdk\samplecode\cs\client\soaplogger correct soap expression.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -