Share via


Microsoft Dynamics CRM 2011 - Entity Logical Name and Entity Schema Name

In Microsoft Dynamics CRM 2011 schema names have a special meaning. This is because Microsoft Dynamics CRM 2011 started the wide use of early bound programming model. CRM 4.0 also had the concept of early bound programming model through the use of "wsdl". CRM 2011 has taken this to the next level. We can generate early bound classes for all the entities and use them in our custom development.

  • 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_Movies". Here "new_" is the customisation prefix set to maintain uniqueness in naming of components. When I save this entity, the name "new_Movies" will be set as schema name and "new_movies" will be set as logical name.


Entity Name (will be saved as Schema 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.


Schema Name and Logical Name for "Movies" 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/oData" 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 information about ‘Microsoft Dynamics CRM 2011 - Entity Logical Name and Entity Schema Name’ was informative. Please feel free to leave your comments.