Compartir a través de


Propiedad QueryByAttribute.TopCount

Se aplica a: CRM 2015 on-prem, CRM Online

Gets or sets the number of rows to be returned.

Espacio de nombres: Microsoft.Xrm.Sdk.Query
Ensamblado: Microsoft.Xrm.Sdk (en Microsoft.Xrm.Sdk.dll)

Sintaxis

'Declaración
<DataMemberAttribute(Order:=50)> _
Public Property TopCount As Nullable(Of Integer)
[DataMemberAttribute(Order=50)] 
public Nullable<int> TopCount { get; set; }

Valor de propiedad

Type: Int32
The number of rows to be returned.

Ejemplo

public void TestQueryByAttributeWithTopCount()
{
         QueryByAttribute query = new QueryByAttribute();
         query.EntityName = "Account";
         query.ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet(new string[] { "name" });
         query.AddAttributeValue("address1_city", "seattle");
         query.TopCount = 3;
}

Comentarios

When specified, this limits the number rows returned in a query result set to the specified number of rows.

A query can contain either PageInfo or TopCount property values. If both are specified, an error will be thrown.

Seguridad de hilo

Los miembros estáticos públicos (Shared en Visual Basic) de este tipo son seguros para el hilo. No se garantiza que los miembros de instancia sean seguros para el hilo.

Plataformas

Plataformas de desarrollo

Windows Vista, Windows Server 2003 y

Plataformas de destino

Windows Vista,Windows XP

Change History

Vea también

Referencia

Clase de QueryByAttribute
Miembros de QueryByAttribute
Espacio de nombres de Microsoft.Xrm.Sdk.Query

Send comments about this topic to Microsoft.
© 2014 Microsoft Corporation. All rights reserved.