Using Entity Names
[Applies to: Microsoft Dynamics CRM 4.0]
Find the latest SDK documentation: CRM 2015 SDK
It is easy to confuse the schema name and logical name because the Web application customization forms use the label schema name for the logical name. Just be aware that after the entity or attribute is created, the SDK always uses the name in lowercase.
For example, the logical name of the Account entity is account. The logical name of a custom entity called Bank Account could be new_bankaccount.
The following table describes the various names for an entity.
|Display Name||The entity name that is displayed to the user in the Web application and the Microsoft Dynamics CRM for Microsoft Office Outlook.|
|Display Collection Name||A plural version of the display name.|
|Logical Name||The name of the class created in the Web service that represents the entity. This name is all lowercase. If it is a custom entity, it has the prefix defined in the organization.schemanameprefix attribute.
For system entity names, you can use the EntityName enumeration.
|Schema Name||The schema name for an entity is used to create the logical name and the secured view. This name should use Pascal case.|
For a description of Pascal case, see the .NET Framework Developer Guide Capitalization Conventions found at msdn2.microsoft.com/en-us/library/ms229043.aspx.
The following table shows examples of how to use names in the SDK.
|Type, Class, or Enumeration||Convention||Example|
|System entity class name||All lowercase. This is the logical name in the metadata.||
|Custom entity class name||All lowercase with an underscore after the prefix defined in customization settings.||
|Attribute property name||All lowercase. This is the logical name in the metadata.||
|Message name||Pascal case||
|State enumeration||Pascal case||
|References to entity names in Fetch and QueryExpression||All lowercase. This is the logical name in the metadata.||
|Filtered view name||Pascal case||