0

フェッチがあり、2 つのルックアップに含まれるエンティティを他のリンクされたエンティティ ID にリンクしたい

コード:

  <fetch mapping='logical'>
      <entity name='serviceappointment'>
      <attribute name='activityid' />
        <filter type='and'>
          <condition attribute='statecode' operator='eq' value='3' />
        </filter>
        <link-entity name='lead' from='leadid' to='regardingobjectid' alias='af' >
          <attribute name='leadid' />
          <link-entity name='contact' from='contactid' to='new_customer' alias='ai' >
            <attribute name='contactid' /> 
          </link-entity>
          <link-entity name='new_record' from='new_recordid' to='new_record' alias='ag' >
          <attribute name='new_recordid' /> 
          </link-entity>
        </link-entity>
      </entity>
    </fetch>

これは正常に動作しますが、2 つの検索フィールド「new_record」と「new_contact」を介して連絡先を new_record にリンクする別のエンティティ「new_linkRecordContact」があります。

link-entity を contact または new_record のいずれかに追加できますが、リンクされたエンティティの両方を含むという条件が必要です

例:

<link-entity name='new_linkrecordrontact' from='new_record' to='new_recordid' alias='ag' >

また

<link-entity name='new_linkrecordcontact' from='new_contact' to='contactid' alias='ag' >

しかし、OR の代わりに AND を使用したい

ロジック:

'new_linkrecordcontact.new_record' = 'new_record.new_recordid' AND 'new_linkrecordcontact.new_contact' = 'contact.contactid' の 'new_linkrecordcontact' からの 'new_linkrecordcontactid'

それをフェッチに書き込む方法はありますか?

ありがとうございました

4

1 に答える 1

1

高度な検索を使用すると、次の手順に従って、必要な FetchMXL クエリを作成できます。

  • 高度な検索フォームを開く
  • 必要に応じてクエリを作成します
  • クエリ画面のリボンに [FetchXML のダウンロード] ボタンがあります。クリックします。
  • CRM にクエリを作成して渡す

高度な検索で必要な結果が得られない場合は、FetchXML の制限に直面しているため、他のデータ取得方法 (OData、SDK) を使用する必要があります。たとえば、異なるエンティティに存在するフィールドにフィルターを適用することはできません。

于 2014-01-16T15:25:08.727 に答える