다음을 통해 공유


ColumnSet Class

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

Specifies the attributes for which non-null values are returned from a query.

For the Web API the corresponding type is ColumnSet ComplexType.

Namespace:   Microsoft.Xrm.Sdk.Query
Assembly:  Microsoft.Xrm.Sdk (in Microsoft.Xrm.Sdk.dll)

Inheritance Hierarchy

System.Object
  Microsoft.Xrm.Sdk.Query.ColumnSet

Syntax

[DataContractAttribute(Name = "ColumnSet", Namespace = "https://schemas.microsoft.com/xrm/2011/Contracts")]
public sealed class ColumnSet : IExtensibleDataObject
<DataContractAttribute(Name := "ColumnSet", Namespace := "https://schemas.microsoft.com/xrm/2011/Contracts")>
Public NotInheritable Class ColumnSet
    Implements IExtensibleDataObject

Constructors

Name Description
System_CAPS_pubmethod ColumnSet()

Initializes a new instance of the ColumnSet class.

System_CAPS_pubmethod ColumnSet(Boolean)

Initializes a new instance of the ColumnSet class setting the AllColumns property.

System_CAPS_pubmethod ColumnSet(String[])

Initializes a new instance of the ColumnSet class setting the Columns property.

Properties

Name Description
System_CAPS_pubproperty AllColumns

Gets or sets whether to retrieve all the attributes of a record.

System_CAPS_pubproperty Columns

Gets the collection of Strings containing the names of the attributes to be retrieved from a query.

System_CAPS_pubproperty ExtensionData

Gets or sets the structure that contains extra data.

Methods

Name Description
System_CAPS_pubmethod AddColumn(String)

Adds the specified attribute to the column set.

System_CAPS_pubmethod AddColumns(String[])

Adds the specified attribute to the column set.

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Remarks

The ColumnSet class is used with methods and messages that retrieve one or more records from the database. The query returns non-null values for the attributes that are contained in the Columns property. The attributes not included in the ColumnSet will contain null values. If the column set includes attributes that are not valid for retrieve, they will be ignored and no values will be returned for those attributes.

The primary key is always returned and contains a non-null value.

Attributes are specified by name. For more information, see SchemaName.

Thread Safety

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

ConvertQuoteToSalesOrderRequest
ConvertSalesOrderToInvoiceRequest
GenerateInvoiceFromOpportunityRequest
GenerateQuoteFromOpportunityRequest
GenerateSalesOrderFromOpportunityRequest
Retrieve
QueryByAttribute
QueryExpression
RetrieveAllChildUsersSystemUserRequest
RetrieveBusinessHierarchyBusinessUnitRequest
RetrieveMembersTeamRequest
RetrieveRequest
RetrieveSubsidiaryTeamsBusinessUnitRequest
RetrieveSubsidiaryUsersBusinessUnitRequest
RetrieveTeamsSystemUserRequest
RetrieveUnpublishedRequest
RetrieveUserSettingsSystemUserRequest
ReviseQuoteRequest
SearchByBodyKbArticleRequest
Microsoft.Xrm.Sdk.Query Namespace
Use the ColumnSet class
Use the QueryByAttribute class
Use the QueryExpression class

Return to top

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright