Sunday, June 28, 2009

Error while Creating a New Entity in CRM v4.0

Suppose you are creating a new Entity Projects. You enter the relevant details on the General tab while creating new entity.

On the Primary Attribute tab you mention the following details.

Now you click Save or Save and Close but you don't expect this.

Since the error is very generic, it might put you in a fix.
Fiddler clarifies with this message

Column names in each table must be unique. Column name 'new_projectid' in table 'new_projectExtensionBase' is specified more than once.

What it means is, you cannot have the Primary Attribute's Schema Name field as new_ProjectID as this name would be given to the Primary Key that CRM creates in the background which is used as the GUID. You must either change the schema name of the primary attribute or the schema name of the entity in the Entity Definition section on the General tab.

If above is not the case, it might be related to System Customizer Security Role