2016-12-21 1 views
1

웹 API 내에서 XML 가져 오기를 사용하여 페이징에 this 접근 방식을 사용하고 있습니다. 우리가 가져 간단한 사용할 때웹 API 역학을 사용하여 가져 오기 XML 실행 365

웹 API는 완벽하게 작동하고 그것은 이상의 레코드가있는 경우 결과와 쿠키를 함께 pagging 반환하지만 우리가 복잡한 사용할 때 (우리가 링크 개체를 경우)는 페이징 쿠키하지만, 빈 등을 반환 XML 가져 오기 :

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

여기서 우리는 pagingcookie에 아무것도 없다는 것을 알 수 있습니다. 우리가 @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> 

:
쿼리에 사용되는 XML을 가져옵니다.

복잡한 시나리오에서 정확한 페이징 쿠키를 얻을 수있는 방법이 있습니까?

답변

2

나는 이것이 표준 조직 서비스에서 전에 일어난 것을 보았습니다. 페이징 쿠키없이 페이징을 제안 할 것입니다. 이로 인해 조직 서비스에서 저를위한 문제가 해결되었습니다.

예. <fetch mapping="logical" page="1" count="50">

+0

감사합니다. 이것은 나를 위해 일했다. –

관련 문제