paging and recordcount

Hi!

i'm implementing a paged view. the pageinfo works correctly and i can get 
the right pages.
but to properly implement paging i need to know the number of potential 
pages. say i have
1000 records and a page size of 10 i should have 100 pages. i'm using the 
webservice.

i could not find anything in the documentation or sdk which implements this. 
anybody got
any idea how to solve this?

Alwin 


0
alwin
2/26/2007 3:39:35 PM
crm 35858 articles. 1 followers. Follow

1 Replies
520 Views

Similar Articles

[PageSpeed] 12

Hi Alwin,

You need the Fetch service to retrieve the number of records. Here's an 
example:

<fetch mapping="logical" aggregate="true">
  <entity name="account">
    <attribute name="accountid" aggregate="count" alias="count" />
  </entity>
</fetch>

The result is:

<resultset morerecords="0">
  <result>
    <count>702</count>
  </result>
</resultset>

Parse the number from the result string and divide it by your page count. 
You can use the FetchXML wizard 
(http://www.stunnware.com/crm2/topic.aspx?id=FindingData6) to create these 
and other types of queries.

-- 
Michael H�hne, Microsoft Dynamics CRM MVP

Web: http://www.stunnware.com/crm2
Feed: http://www.stunnware.com/crm2/atom.aspx
Custom Lookup Dialog: http://www.stunnware.com/crm2/?area=customLookup

----------------------------------------------------------

"alwin" <alwin@cs.nl> schrieb im Newsbeitrag 
news:ueBcTxbWHHA.5108@TK2MSFTNGP06.phx.gbl...
> Hi!
>
> i'm implementing a paged view. the pageinfo works correctly and i can get 
> the right pages.
> but to properly implement paging i need to know the number of potential 
> pages. say i have
> 1000 records and a page size of 10 i should have 100 pages. i'm using the 
> webservice.
>
> i could not find anything in the documentation or sdk which implements 
> this. anybody got
> any idea how to solve this?
>
> Alwin
> 


0
Michael
2/26/2007 3:50:02 PM
Reply:

Similar Artilces: