Types in the Microsoft Dynamics CRM SDK 2013

 

Applies To: Dynamics CRM 2013

This topic describes the types used in Microsoft Dynamics CRM.

Since the release of Microsoft Dynamics CRM 2011, the programming model has been changed to use native .NET types whenever possible. The following table shows the mapping between the defined type for an entity attribute, the type that is used in a record, and the type that was used in Microsoft Dynamics CRM 4.0.

AttributeTypeCode

New type

Microsoft Dynamics CRM 4.0 type

AttributeTypeCode.BigInt

long

N/A

AttributeTypeCode.Boolean

bool 

CrmBoolean

AttributeType.CalendarRules

EntityCollection or CalendarRules[]

DynamicEntity[] or calendarrule[]

AttributeType.Customer

EntityReference

Customer

AttributeType.DateTime

System.DateTime

CrmDateTime

AttributeType.Decimal

decimal 

CrmDecimal

AttributeType.Double

double 

CrmFloat

AttributeType.EntityName

string

Attributes with ObjectTypeCode in DisplayMask

AttributeType.Integer

int

CrmNumber

AttributeType.Lookup

EntityReference

Lookup

AttributeType.ManagedProperty

BooleanManagedProperty

N/A

AttributeType.Memo

string 

System.String

AttributeType.Money

 Money

CrmMoney

AttributeType.Owner

EntityReference

Owner

AttributeType.PartyList

 EntityCollection or ActivityParty[]

activityparty[] or DynamicEntity []

AttributeType.Picklist

OptionSetValue

Picklist

AttributeType.Uniqueidentifier (Formerly PrimaryKey)

System.Guid

Key

AttributeType.String

string

System.String

AttributeType.State

OptionSetValue or enumeration generated for the entity state

EntityNameStateInfo

AttributeType.Status

OptionSetValue 

Status

AttributeType.Uniqueidentifier

System.Guid

UniqueIdentifier

AttributeType.Virtual

Not used in records.

Not used in records.

Show: