我有一个获取,我想将一个包含 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>
这很好用,但是我有另一个实体“new_linkRecordContact”,它通过 2 个查找字段“new_record”和“new_contact”将联系人与 new_record 链接起来
我可以将链接实体添加到联系人或 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' >
但我想使用 AND 而不是 OR
逻辑:
'new_linkrecordcontactid' 来自 'new_linkrecordcontact' 其中 'new_linkrecordcontact.new_record' = 'new_record.new_recordid' AND 'new_linkrecordcontact.new_contact' = 'contact.contactid'
任何想法如何将其写入获取?
谢谢