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

FetchXML to return last x created view

$
0
0

I am trying to create an order view using fetchxml to bring back the last 5 orders created. (This will be used on account sub-grid form). However this does not seem to be working. Am I missing something in the code below?

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" count="5">
<entity name="salesorder">
<attribute name="name" />
<attribute name="totalamount" />
<attribute name="requestdeliveryby" />
<attribute name="new_customerpo" />
<attribute name="createdon" />
<order attribute="createdon" descending="false" />
<filter type="and">
<condition attribute="statecode" operator="ne" value="2" />
</filter>
<attribute name="salesorderid" />
</entity>
</fetch>
</fetchxml>


Viewing all articles
Browse latest Browse all 55831

Trending Articles



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