I have a query that I need to execute against CRM. It is the equivalent of the following in SQL:
SELECT A.*, B.*
FROM Table1 A INNER JOIN Table2 B
ON A.ID = B.ID
I created a query and added a linkentity as follows:
link.JoinOperator = JoinOperator.Inner;
link.LinkFromEntityName = EntityName.new_Table1.ToString();
link.LinkFromAttributeName = "new_Table1ID";
link.LinkToEntityName = EntityName.new_Table2.ToString();
link.LinkToAttributeName = "new_Table2ID";
query.LinkEntities = new LinkEntity[] { link };
However, it only returns the columns from new_Table1.
Is there a way to link in this fashion and return the columnns from both entities without having to create two queries?