Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

Issue with link entities and condition

$
0
0

We have a requirement is to retrieve all the TE (Transactional entity records) records for the user logged in, which are having mapping to ME1 and ME2 at Team entity level.

Perhaps, the Advance find is not applying the “AND” condition between the link entities and giving the results of union. We tried to run the fetch xml query through a console application, result is same.

 

Is there any possibility of applying “AND” condition between link entities (ME1 & ME2) in CRM 2013 for the below hierarchy?

 

Please find the below diagram for the entity relationship we have.

 

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
<entity name="vital_servicerequest">
<attribute name="Transactional Entity" />
<order attribute="subject" descending="false" />

<link-entity name="Master ENtity 1" from="ME1" to="ME1id" alias="bm">
<link-entity name="vital_team_ME1" from="ME1id" to="ME1id" visible="false" intersect="true">
<link-entity name="team" from="teamid" to="teamid" alias="bn">
<link-entity name="teammembership" from="teamid" to="teamid" visible="false" intersect="true">
<link-entity name="systemuser" from="systemuserid" to="systemuserid" alias="bo">
<filter type="and">
<condition attribute="systemuserid" operator="eq-userid" />
</filter>
</link-entity>
</link-entity>
</link-entity>
</link-entity>
</link-entity>

<link-entity name="Master Entity 2" from="ME2" to="ME2id" alias="bp">
<link-entity name="vital_team_ME2" from="ME2id" to="ME2id" visible="false" intersect="true">
<link-entity name="team" from="teamid" to="teamid" alias="bq">
<link-entity name="teammembership" from="teamid" to="teamid" visible="false" intersect="true">
<link-entity name="systemuser" from="systemuserid" to="systemuserid" alias="br">
<filter type="and">
<condition attribute="systemuserid" operator="eq-userid" />
</filter>
</link-entity>
</link-entity>
</link-entity>
</link-entity>
</link-entity>

</entity>
</fetch>

 


Viewing all articles
Browse latest Browse all 55831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>