3

そのため、CRM にデータが保持されていない場合、FetchXML を使用しても列が返されないようです。

例えば:

<fetch mapping="logical" count="50">
<entity name="contact">
    <attribute name="contactid" />
    <attribute name="emailaddress1" />
    <attribute name="firstname" />
    <attribute name="jobtitle" />
    <attribute name="lastname" />
    <attribute name="mobilephone" />
    <attribute name="parentcustomerid" />
    <attribute name="telephone1" />
    <filter>
        <condition attribute="parentcustomerid" operator="eq" value="94bf630f-b364-de11-8f1d-001cc02e75b4" />
    </filter>
</entity>

ただし、返される XML は次のとおりです。

<resultset morerecords="0" paging-cookie="&lt;cookie page=&quot;1&quot;&gt;&lt;contactid last=&quot;{86805DB5-E06B-DE11-81EE-001CC02E75B4}&quot; first=&quot;{7CBC9B9A-E06B-DE11-81EE-001CC02E75B4}&quot; /&gt;&lt;/cookie&gt;">
<result>
    <contactid>{7CBC9B9A-E06B-DE11-81EE-001CC02E75B4}</contactid>
    <emailaddress1>tom@xxx.org.uk</emailaddress1>
    <firstname>tommy</firstname>
    <jobtitle>Dude</jobtitle>
    <lastname>Smith</lastname>
    <parentcustomerid yomi="" name="Tom's bike shoppe" dsc="0" type="1">{94BF630F-B364-DE11-8F1D-001CC02E75B4}</parentcustomerid>
</result>
<result>
    <contactid>{86805DB5-E06B-DE11-81EE-001CC02E75B4}</contactid>
    <emailaddress1>jason@xxx.org.uk</emailaddress1>
    <firstname>jason</firstname>
    <lastname>Finch</lastname>
    <parentcustomerid yomi="" name="Tom's bike shoppe" dsc="0" type="1">{94BF630F-B364-DE11-8F1D-001CC02E75B4}</parentcustomerid>
</result>

たとえば、2 番目のレコードには役職がなく、どちらのレコードにも携帯電話番号がありません。これにより、これらをデータ コントロールにバインドするのが難しくなっています。

基本的に私の質問は、CRM にこれらのフィールドを空白または null 値で返すように強制することは可能ですか?

4

2 に答える 2

2

要するに、いいえ。

バインディングの状況の詳細はわかりませんが、XML にバインドするのではなく、フェッチ結果を入力してからそれにバインドするカスタム モデル クラスを作成できますか?

于 2009-07-27T16:34:49.870 に答える