Type Mapping Between Versions CRM 2011 and CRM 4

I found this good article today describing the type mappings between CRM 4 and CRM 2011.  They have had a change mind and gone towards .NET types.  I was watching a video and the speaker said this was because .NET had brought in Nullable values which is what CRM 4 introduced before .NET did.

In Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online, the programming model has been changed to use native .NET types whenever possible.

Type Mapping Between Versions

The following table shows the mapping between the defined type for an attribute, the type that is used in a record and the type that was used in Microsoft DynamicsCRM4.0.

Attribute Type Microsoft DynamicsCRM2011 Type Microsoft DynamicsCRM4.0 Type
AttributeTypeCode.Boolean bool or System.Boolean CrmBoolean


DynamicEntity[] orcalendarrule[]
AttributeType.Customer EntityReference Customer
AttributeType.DateTime System.DateTime CrmDateTime
AttributeType.Decimal decimal or System.Decimal CrmDecimal
AttributeType.Double double or System.Double CrmFloat
AttributeType.Integer int or System.Integer CrmNumber



Not used in records.

Not used in records.
AttributeType.Lookup EntityReference Lookup
AttributeType.Memo string or System.String System.String
AttributeType.Money Money CrmMoney
AttributeType.Owner EntityReference Owner
AttributeType.PartyList EntityCollection or ActivityParty[] activityparty[] orDynamicEntity []
AttributeType.Picklist OptionSetValue Picklist
AttributeType.PrimaryKey System.Guid Key
AttributeType.String System.String System.String
AttributeType.State OptionSetValue or enumeration generated for the entity state EntityNameStateInfo
AttributeType.Status OptionSetValue orint Status
AttributeType.Uniqueidentifier System.Guid UniqueIdentifier
AttributeType.Virtual System.Object 

Not used in records.

Not used in records.

Other Type Changes

6 thoughts on “Type Mapping Between Versions CRM 2011 and CRM 4

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.