1
소유자가있는 비즈니스와 기회가 성공할 확률을 기반으로 모든 레코드를 반환하는이 FetchXML 쿼리가 있습니다. 보고하는 모든 입력란은 필수 입력란입니다. 내가 가지고있는 문제는 내 연결된 계정 중 하나입니다. "new_dealerid"계정이 항상 채워지지 않을 수도 있습니다. 포함 시키면 31 개의 레코드 만 가져올 수 있습니다 (모두 대리점 있음). 그렇지 않으면 32 개가됩니다. (새로운 제품에는 딜러가 없습니다). 그래서 누군가가 빈 문자열이나 뭔가 관련 속성이 없다면이 속성을 기본값으로 만드는 방법을 알고 있습니까?FetchXML - 레코드가 반환되지 않습니다.
<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>
결국 작업으로 인해 new_dealerid가 속성으로 사용되었습니다. 하지만 fetchXml의 링크 유형에 대해 알아두면 좋습니다. 감사합니다. –