2016-12-21 10 views
1

Web API内でFetch XMLを使用してページングする方法がthisです。Web API Dynamicsを使用してFetch XMLを実行する365

:我々はフェッチシンプル使い、そこに多くのレコードがあるが、我々は複雑な(私たちはリンクエンティティを持っている場合)XMLのフェッチを使用する場合、それはページングクッキーが、空などを返す場合、それが結果と一緒にクッキーをpagging返すとき

のWeb APIは、完璧な作品

<b><cookie pagenumber="2" pagingcookie="" istracking="False" /></b>

ここでは、pagingcookieに何もないことがわかります。
クエリに使用されるXML取得:我々はリンクされたエンティティを削除した場合、それは@Microsoft.Dynamics.CRM.fetchxmlpagingcookieを使用して取得することができます応答の正確なページングクッキーを与える開始し

<fetch mapping="logical" version="1.0" output-format="xml-platform" count="10" page="1" > 
    <entity name="invoicedetail" > 
    <attribute name="invoicedetailid" /> 
    <attribute name="uomid" /> 
    <attribute name="quantity" /> 
    <attribute name="manualdiscountamount" /> 
    <attribute name="priceperunit" /> 
    <attribute name="extendedamount" /> 
    <filter> 
    <condition entityname="invoice" attribute="customerid" operator="eq" value="{5A8F8B46-2443-E511-80E3-3863BB351E10}" /> 
    </filter> 
    <link-entity name="invoice" from="invoiceid" to="invoiceid" > 
    <attribute name="invoiceid" /> 
    <attribute name="invoicenumber" /> 
    <attribute name="description" /> 
    <attribute name="totalamount" /> 
    <order attribute="ss_postingdate" descending="true" /> 
    </link-entity> 
    </entity> 
    </fetch> 

を。

複雑なシナリオで正確なページングCookieを取得する方法はありますか?

答えて

2

私はこれが以前の標準的な組織サービスで起こっているのを見ました。ページングのクッキーを使わずにページングすることをお勧めします。これにより、私は組織のサービスで問題を解決しました。

など。 <fetch mapping="logical" page="1" count="50">

+0

ありがとうございました。これは私のために働いた。 –

関連する問題