I am using FetchXml to query CRM 4.0. We have a special case that will require a composite connection between CRM-entites. The FetchXml schema indicates that multiple elements of the link-entity element are allowed, and also indicates that several filter / condition elements can be added to the link element. The problem I am facing is that the value attribute of the condition element does not indicate the name of the object / column. He expects an explicitly declared value.
For example, FetchXml allows you to specify this:
<link-entity name='myentity' from='column1' to='column2'/>
... which is equivalent to T-SQL of this:
JOIN myentity on column1 = column2
And it allows you to specify this:
<link-entity name='myentity' from='column1' to='column2'> <filter type='and'> <condition attribute='column3' operator='eq' value='myvalue' /> </filter> </link>
... which is the T-SQL equivalent of this:
JOIN myentity on column1 = column2 AND column3 = 'myvalue'
FetchXml does not appear, however, to provide an equivalent of this:
JOIN myentity on column1 = column2 AND column3 = column4
Pay attention to the difference. FetchXml provides conditions in a join, but it appears to provide a compound join, i.e. a join of several columns.
Has anyone in cyberspace been able to make a compound connection using FetchXml in CRM 4.0? Thanks!
Additional Information:
I am looking for an answer that FetchXml uses to accomplish this, not SQL or QueryExpression syntax. The above SQL should just explain the concept.
dynamics-crm fetchxml
Wiregrasscoder
source share