Thursday, July 28, 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.Booleanbool or System.BooleanCrmBoolean
AttributeType.CalendarRulesEntityCollectionDynamicEntity[] or calendarrule[]
AttributeType.CustomerEntityReferenceCustomer
AttributeType.DateTimeSystem.DateTimeCrmDateTime
AttributeType.Decimaldecimal or System.DecimalCrmDecimal
AttributeType.Doubledouble or System.DoubleCrmFloat
AttributeType.Integerint or System.IntegerCrmNumber
AttributeType.
Internal
System.Object
Not used in records.
Not used in records.
AttributeType.LookupEntityReferenceLookup
AttributeType.Memostring or System.StringSystem.String
AttributeType.MoneyMoneyCrmMoney
AttributeType.OwnerEntityReferenceOwner
AttributeType.PartyListEntityCollection or ActivityParty[]activityparty[] or DynamicEntity []
AttributeType.PicklistOptionSetValuePicklist
AttributeType.PrimaryKeySystem.GuidKey
AttributeType.StringSystem.StringSystem.String
AttributeType.StateOptionSetValue or enumeration generated for the entity stateEntityNameStateInfo
AttributeType.StatusOptionSetValue orintStatus
AttributeType.UniqueidentifierSystem.GuidUniqueIdentifier
AttributeType.VirtualSystem.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:

Post a Comment