Question Status

Verified
Andrew Ciccarelli asked a question on 7 May 2013 4:47 PM

Hello - How does CRM handle new entity fields?  For example, if I open Contact in Customizations and add a new field does CRM automatically create a ContactExtensionBase table?

Does CRM follow this pattern for all entities?  For example, if I add a new field to SystemUser does CRM automatically create a new table named SystemUserExtensionBase?

I've noticed this pattern in the local CRM implementation I'm working on and I was wondering if this was a convention that the dev team implemented or if CRM implements this pattern by default based on changes made through its UI?

Reply
Verified Answer
Jason Lattimer responded on 8 May 2013 9:32 AM

For all the out of the box entities, you should already see both tables, for any entities you make - CRM will create both tables at the point.

So on a vanilla install, you should already see SystemUserBase and SystemUserExtensionBase tables (as well as corresponding tables for each of the stock entities). If you add a field, it will be placed into the SystemUserExtensionBase table.  All of the out of the box fields exist in SystemUserBase.

Jason Lattimer
My Blog -  Follow me on Twitter -  LinkedIn

Reply
Suggested Answer
Jason Lattimer responded on 8 May 2013 6:01 AM

The EntityName + Base and EntityName +ExtensionBase are both instantiated when the entity is first saved, it does so for all user created entities. All user created fields end up in the ExtensionBase table - the regular Base table is reserved for system fields - so you would notice on custom entities, the Base table doesn't have very many fields. This happens regardless of the entity being system or custom.

Jason Lattimer
My Blog -  Follow me on Twitter -  LinkedIn

Reply
Jerry Weinstock responded on 7 May 2013 6:25 PM

Interesting question, I don't know the answer.

However, I am curious as to why you need this answer and how you will use it?

Jerry, Microsoft Dynamics CRM MVP
CRM Innovation - Consulting and Solutions
Need a solution for CRM to help you manage your Internet Lead Capture or Events ?
Follow me on Twitter

Reply
Suggested Answer
Jason Lattimer responded on 8 May 2013 6:01 AM

The EntityName + Base and EntityName +ExtensionBase are both instantiated when the entity is first saved, it does so for all user created entities. All user created fields end up in the ExtensionBase table - the regular Base table is reserved for system fields - so you would notice on custom entities, the Base table doesn't have very many fields. This happens regardless of the entity being system or custom.

Jason Lattimer
My Blog -  Follow me on Twitter -  LinkedIn

Reply
Andrew Ciccarelli responded on 8 May 2013 8:13 AM

@Jason - Thanks for that info.  

Are you saying that if I add a new field to an entity in a standard CRM implementation then CRM will auto-create those 2 tables and those tables do not already exist as part of the standard implementation?  

So if I add a field to SystemUser, CRM would create SystemUserBase and SystemUserExtensionBase?  What is the default database mapping for SystemUser as part of a standard implementation if no custom fields have been added?

Reply
Verified Answer
Jason Lattimer responded on 8 May 2013 9:32 AM

For all the out of the box entities, you should already see both tables, for any entities you make - CRM will create both tables at the point.

So on a vanilla install, you should already see SystemUserBase and SystemUserExtensionBase tables (as well as corresponding tables for each of the stock entities). If you add a field, it will be placed into the SystemUserExtensionBase table.  All of the out of the box fields exist in SystemUserBase.

Jason Lattimer
My Blog -  Follow me on Twitter -  LinkedIn

Reply
Andrew Ciccarelli responded on 8 May 2013 11:05 AM

great info - thanks jason!

Reply