フェッチがあり、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'
それをフェッチに書き込む方法はありますか?
ありがとうございました