php - FetchXML - record not being return -
i have fetchxml query returns records based off of business owner user in , probability opportunity success. of fields reporting mandatory , filled out. issue i'm having 1 of linked accounts - "new_dealerid" account might not filled, if include 31 records(all of them have dealers), if don't 32(only new 1 doesn't have dealer). know how make attribute default empty string or if there isnt related account?
<request i:type="b:retrievemultiplerequest" xmlns:b="http://schemas.microsoft.com/xrm/2011/contracts" xmlns:i="http://www.w3.org/2001/xmlschema-instance"> <b:parameters xmlns:c="http://schemas.datacontract.org/2004/07/system.collections.generic"> <b:keyvaluepairofstringanytype> <c:key>query</c:key> <c:value i:type="b:fetchexpression"> <b:query><fetch mapping="logical" version="1.0" >
 <entity name="opportunity">
 <attribute name="estimatedvalue" />
 <attribute name="name" />
 <attribute name="new_opportunitytype" />
 <attribute name="new_salesphase" />
 <attribute name="estimatedclosedate" />
 <link-entity name="systemuser" from="systemuserid" to="ownerid">
 <attribute name="fullname"/>
 </link-entity> <link-entity name="account" from="accountid" to="new_dealerid">
 <attribute name="name"/>
 </link-entity> <link-entity name="account" from="accountid" to="customerid">
 <attribute name="name"/>
 </link-entity> <filter type="and"> <condition attribute="salesstagecode" operator="eq" value="'.$prob.'" /> <condition attribute="statuscode" operator="eq" value="1" /> </filter> <link-entity name="systemuser" from="systemuserid" to="ownerid">
 <link-entity name="businessunit" from="businessunitid" to="businessunitid">
 <filter type="and"> <condition attribute="name" operator="eq" value="'.$bu.'" /> </filter> </link-entity> </link-entity> </entity>
 </fetch></b:query> </c:value> </b:keyvaluepairofstringanytype> </b:parameters> <b:requestid i:nil="true"/><b:requestname>retrievemultiple</b:requestname> </request>
to clarify, want 32 records?
in case need use outer join.
<link-entity name="account" from="accountid" to="new_dealerid" link-type="outer">
Comments
Post a Comment