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 |
AttributeType.CalendarRules | 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 |
AttributeType.
Internal |
System.Object
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. |
6 thoughts on “Type Mapping Between Versions CRM 2011 and CRM 4”