fetchXML で 2 つの左外部結合を確立しようとしています。このSQLステートメントを実行できますか...
select
a.new_campaignid
, a.new_ContactId
, b.new_campaigncontactstatusId
from
new_ContactCampaignNN AS a
left outer join new_campaigncontactstatus AS b ON a.new_contactid = b.new_ContactId
AND a.new_campaignid = b.new_CampaignId
このような fetchXML ステートメントに?
<fetch mapping='logical' distinct='true'>
<entity name='new_contactcampaignnn'>
<attribute name='new_campaignid' />
<attribute name='new_contactid' />
<filter type='and'>
<condition attribute ='new_campaignid' operator='eq' value='72C9284B-905D-E111-9847-002655325864'/>
</filter>
<link-entity name='new_campaigncontactstatus' from='new_contactid' to='new_contactid' visible='true' link-type='outer' alias='new_contactcampaignnn_new_campaigncontactstatus'>
<attribute name='new_campaigncontactstatusid' />
<link-entity name='new_contactcampaignnn' from='new_campaignid' to='new_campaignid' visible='true' link-type='outer' alias='new_contactcampaignnn_new_campaigncontactstatus1'></link-entity>
</link-entity>
</entity>
</fetch>