Hi, I have account and case entity, they are associated by account ID. In case entity, it mapped to customerid lookup field. My question is how can I left join case entity through account entity, since there is no account ID attribute in case entity.
sql query:
select a.LegalName,a.RegistrationID,a.Address1_PostalCode,a.im_OrganizationID,c.[Resolution Date] from [001 Accounts] a
left join dbo.[013Case] c on a.im_OrganizationID = c.[ACCOUNT ID]
where c.[ACCOUNT ID]='11738'
fetchXML:
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="account">
<attribute name="new_registrationid" />
<attribute name="new_legalname" />
<attribute name="new_im_organizationid" />
<attribute name="address1_postalcode" />
<attribute name="address1_primarycontactname" />
<attribute name="accountid" />
<link-entity name="incident" from="dev_accountid" to="im_OrganizationID" alias="ab" link-type="outer">
<attribute name="Resolution Date"/>
</link-entity>
<filter type="and">
<condition entityname="ab" attribute="dev_accountid" operator="eq" value="11738"/>
</filter>
</entity>
</fetch>
*This post is locked for comments
I have the same question (0)