I am relatively new to FetchXML and am trying to structure a query linking two entities. These entities are respectively invoice and invoiceitem, with a one to many relationship. Both share a common guid field: ts_invoiceid, and I've confirmed that the same guid exists in both entities. I can query the two entities independently, but if I try to join them together, nothing appears for the to entity. The first entity in the query always displays, but the second linked entity appears as null.
In troubleshooting,
1) I've reversed the order of the query, and it is always the to values that appear null.
2) I've tried this selecting both all attributes and specific attributes and the results are the same
3) I also tried applying a filter to narrow the scope of the query, but again have the same results.
4) I've also tried explicitly setting the link as an Inner Join
A sample of the query is below. Is there anything syntax or structure wise that would be preventing the join? Or anything else that may be a consideration? Please advise. Look forward to a response.
<fetch mapping='logical'>
<entity name='ts_invoiceitem'>
<all-attributes />
<link-entity name="ts_invoice" to="ts_invoiceid" from="ts_invoiceid">
<all-attributes />
</link-entity>
</entity>
</fetch>
JG