This documentation is archived and is not being maintained.

QueryByAttribute.PageInfo Property

banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Find the latest SDK documentation: CRM 2015 SDK

Gets or sets the number of pages and the number of entity instances per page returned from the query.


[Visual Basic .NET]
Public Property PageInfo As PagingInfo
public PagingInfo PageInfo {get; set;}

Property Value

The value of this property is a PagingInfo type.


To retrieve a subsequent "page" of results from a query, you must supply a value for the PagingInfo.PagingCookie property.


The following example demonstrates how to use the QueryByAttribute.PageInfo property.

// Create the QueryByAttribute object.
QueryByAttribute query = new QueryByAttribute();
// Be aware that using AllColumns may adversely affect
// performance and cause unwanted cascading in subsequent 
// updates. A best practice is to retrieve the least amount of 
// data required.
query.ColumnSet = new AllColumns();
query.EntityName = EntityName.account.ToString();

//The query returns two pages and one account entity instance per page.
query.PageInfo = new PagingInfo();
query.PageInfo.Count = 1;
query.PageInfo.PageNumber = 2;


Web Service: CrmService

See Also


© 2010 Microsoft Corporation. All rights reserved.