Export (0) Print
Expand All

QueryByAttribute.PageInfo Property

banner art

[Applies to: Microsoft Dynamics CRM 4.0]

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

Syntax

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

Property Value

The value of this property is a PagingInfo type.

Remarks

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

Example

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

[C#]
// 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;

Requirements

Web Service: CrmService

See Also

Reference


© 2010 Microsoft Corporation. All rights reserved.


Show:
© 2014 Microsoft