Friday, April 8, 2011

List of changes : Type mapping between CRM 4.0 and CRM 2011

In Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online, the programming model has been changed to use native .NET types whenever possible. A beautiful post from Resultondemand explains it all, with all credit to their great job the excerpts of the post is :

Type Mapping Between Versions
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 DynamicsCRM4.0.

Attribute Type Microsoft Dynamics CRM 2011 Type Microsoft DynamicsCRM4.0 Type
AttributeTypeCode.Boolean bool or System.Boolean CrmBoolean
AttributeType.CalendarRules EntityCollection DynamicEntity[] or calendarrule[]
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[] or DynamicEntity []
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
Old Type New Type
CrmAttributeType Class (MetadataService) Microsoft.Xrm.Sdk.Metadata.AttributeTypeCode
Moniker Class (CrmService) Microsoft.Xrm.Sdk.EntityReference
SecurityPrincipal Class (CrmService) Microsoft.Xrm.Sdk.EntityReference
Happy Coding Smile

No comments: