Entity Extension Table (cdf_<entity>_ext) Fields

Entity extension (cdf_<entity>_ext) tables exist only for Microsoft CRM entities that are customizable. (For a list of the entities you can customize, see Data That Can Be Migrated.) When a record is inserted or deleted in an entity base table, a trigger automatically adds the associated record to or deletes the associated record from the entity extension table to keep the data synchronized between the two tables. The primary key for a cdf_<entity>_ext table is <entity>Id, which is the same as the primary key for the cdf_<entity> table.

If you have extended the Microsoft CRM schema and run the CDF Initialization Tool, each new attribute you created in Microsoft CRM for the customizable entity will now have an associated attribute in the entity extension table for that entity. You load your custom data into the custom attributes for each record in the entity extension table.

For example, if you add a new date/time attribute called StartDate to the Microsoft CRM Contact form and publish the change, you will see a new attribute in the cdf_contact_ext table called CFDStartDate. (The prefix to the attribute name is added by Microsoft CRM.) There would be one record in the cdf_contact_ext table for each record in the cdf_contact table. For each contact, you would load your start date data into the record in cdf_contact_ext and the rest of your contact data into the record in cdf_contact.

To make it easier to cleanse your data so that it meets Microsoft CRM requirements, the entity extension table includes a string attribute as well as an integer attribute for storing your data for drop-down list attributes. The integer attribute stores the data that is to be migrated; the string attribute stores the string associated with the integer. All <drop-down list> attributes are integers, and each has an associated <drop-down list>Name string attribute.

For example, if you add a drop-down list in Microsoft CRM, two new attributes, CFPSpecializedCategory and CFPSpecializedCategoryName, are added in the entity extension table. You must populate the string attribute when you populate the CDF database with your data; the integer attribute is populated when you complete the process of cleansing your drop-down list data.

Each attribute in each entity extension table has an associated record in the cdf_EntityAttribute table. Only attributes listed in the cdf_EntityAttribute table are migrated. This means you can create your own additional columns in the entity extension tables for tracking information about cleansing data and removing duplicates. Having the extension table separate from the entity base table provides enough space to store your custom field data and any data cleansing information you need.

© 2005 Microsoft Corporation. All rights reserved.