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>&lt;fetch mapping="logical" version="1.0" &gt;&#xd;                             &lt;entity name="opportunity"&gt;&#xd;                                 &lt;attribute name="estimatedvalue" /&gt;&#xd;                 &lt;attribute name="name" /&gt;&#xd;                 &lt;attribute name="new_opportunitytype" /&gt;&#xd;                 &lt;attribute name="new_salesphase" /&gt;&#xd;                 &lt;attribute name="estimatedclosedate" /&gt;&#xd;                 &lt;link-entity name="systemuser" from="systemuserid" to="ownerid"&gt;&#xd;                     &lt;attribute name="fullname"/&gt;&#xd;                 &lt;/link-entity&gt;                 &lt;link-entity name="account" from="accountid" to="new_dealerid"&gt;&#xd;                     &lt;attribute name="name"/&gt;&#xd;                 &lt;/link-entity&gt;                 &lt;link-entity name="account" from="accountid" to="customerid"&gt;&#xd;                     &lt;attribute name="name"/&gt;&#xd;                 &lt;/link-entity&gt;                 &lt;filter type="and"&gt;                 &lt;condition attribute="salesstagecode" operator="eq" value="'.$prob.'" /&gt;                 &lt;condition attribute="statuscode" operator="eq" value="1" /&gt;                 &lt;/filter&gt;                 &lt;link-entity name="systemuser" from="systemuserid" to="ownerid"&gt;&#xd;                     &lt;link-entity name="businessunit" from="businessunitid" to="businessunitid"&gt;&#xd;                 &lt;filter type="and"&gt;                     &lt;condition attribute="name" operator="eq" value="'.$bu.'" /&gt;                 &lt;/filter&gt;                 &lt;/link-entity&gt;                 &lt;/link-entity&gt;                             &lt;/entity&gt;&#xd;                         &lt;/fetch&gt;</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

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -