Wednesday, 4 June 2014

Entity Logical Name and Entity Schema Name in MSCRM 2011

When we create an Entity, What is the difference between Entity Schema Name and Entity Logical Name ?



When we are creating an entity, at that time, the Name we give is its schema name. When we save this entity the schema name also becomes the logical name. So entities have two names; logical name and schema name. The values are same but with one difference, the casing.
For example, if I create an entity with the Name “new_TestField”. Here “new_” is the customization prefix set to maintain uniqueness in naming of components. When I save this entity, the name new_TestField will be set as schema name and “new_testfield” will be set as logical name.



As we see, the entity schema name = entity logical name. The difference is schema name retains the casing but logical name will always be lowercase. In other words we can say logical name is lower case conversion of the schema name. The same goes for attributes and relationships for an entity.

Where do we use the schema Name and when do we use the 

Logical Name of an Entity ?


  • In CRM 2011 Early bound programming model, we always use schema names.We also use schema names in “Rest/o Data” programming. 
  • Logical names are used in CRM 2011 Late bound programming model. In CRM 2011 JavaScript web resources, we use logical names.


So in this blog we saw that schema names and logical names are same except the casing but they have different usage. In plugins and custom workflow activities, if we use early bound programming model, then we have to use schema names. In plugins and custom workflow activities, if we use late bound programming model, then we have to use logical names.
I hope this blog about ‘Microsoft Dynamics CRM 2011 – Entity Logical Name and Entity Schema Name’ was informative. 

Please feel free to leave your comments.

No comments:

Post a Comment

Blogger Widgets