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

Display result of fetchXML in ADX portal

$
0
0
{% fetchxml my_query %}<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"><entity name="salesorder"><all-attributes/><link-entity name="salesorderdetail" from="salesorderid" to="salesorderid" visible="true" link-type="inner" alias="orderalias"><attribute name="description"/></link-entity></entity></fetch>
{% endfetchxml %}

{% for result in my_query.results.entities %}
    Order Number: {{ result['orderalias.description'] }}
  {% for res in result['orderalias'] %}
      Order Number: {{ result.ordernumber }} <br/>
	  Product: {{ res.description }}<hr/>
  {% endfor %}
{% endfor %}


I've been trying to display the result of my link entity together with the parent entity, this is one to many relationship, where salesorder might contain more than one or more salesorderdetails, what i want to do is to display each salesorderdetails for each salesorder. Above is my sample code but unable to display it properly. What am I missing here? What syntax should I use to achieve it? 


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images