Friday, December 16, 2011

CRM 2011 Data Import - Creating custom entities and fields

When building a custom solution, chances are that new entities with multiple fields are going to be created. In this post I am going to take a look at the Data Import wizard in crm 2011 and use it to accomplish those goals. Data can be imported too if needed, but the focus now is going to be able to create new entities and fields quickly. It is also a good idea to have a re-usable data maps to reproduce the process in a new organization.

A few things to note before we start:
a. The import size limit using the CRM 2011 data import wizard is 8 MB, irrespective of the file format.
b. Column names cannot have special characters
c. Enclose data in quotes( " ) if it contains special characters.

The business case is to create a new entity called Events. The fields are Event Name (text), Event Type (optionset), Status (optionset), Account (lookup), From (date), To (date).


1. Open a excel worksheet. The first row should contain the column names. This is the setup I have (remember that for lookup data import, the name should be an exact match). Save the file in csv format.







2. Go to Settings/ Data management/ Imports/ Import Data.























3. Select the csv file from step 1 for the data file name. Click Next.



































4. In the Review File Upload Summary dialog, make sure that the checkbox for "First row contains column headings" under section Delimiter Settings is checked.



































5. In the Select Data map dialog, select Default (Automatic Mapping) option, as we are going to create a new data map.



































6. In the Map Data Types dialog, select "Create New"  for CRM record Type. Specify the name of the new entity and other attributes as in the screen shot. Click OK and Next.




































7. In Map Fields screen, map the event name to the crm field name. For the account optional field, choose "Create New". The screenshot gives details on creating a new lookup to account entity with the account name being referenced in the source data.



































8. For Event Type optional field, choose "Create New". The screenshot gives details on creating a new optionset with the available source data values as the options. Map the date fields to date/time, and status field to a new optionset.






























9. The review mapping screen will notify of the source data has been successfully mapped to the new fields in crm. Click Next.



































10. In Review Settings and Import data screen specify the owner of the new records (another way is the have owner column in the source data and map it to crm field owner). Provide a name for the new data map. Clicking Submit will start the import job, which might take some time depending on the amount of data and number of relationships in the source file.



































11. If the file has imported successfully, you will see the new entity under Workplace/ Extensions. Note that the new fields created will not show up automatically on the form - they will need to be added from the form editor wizard.


No comments:

Post a Comment