CRiMport
Data import tool for
Microsoft Dynamics CRM 3.0
Content Table
CriMport is a tool used to import data into all CRM Entities (“system” and “custom”). It’s possible to import attributes and relationship.
Because we’re talking about an “import process”, it’s clear that we’re talking about existing data to migrate; so it would be possible to define a field, containing the old “primary key”. This field will be used in CRiMport to relate the entities.
Note: if in the old database the PK field is the result of multiple fields, it will be possible to transfer it in one field containing the concatenation of values of the original PK (the concatenation will be to fixed length field).
F.E.: the
name varchar(10)
surname varchar(10)
In CRiMport it will imported as:
name char(10) + surname char(10)
Then “JOHN SMITH” it would be “JOHN______SMITH”
And “JO” “HNSMITH” it would be “JO________HNSMITH”
If it would be necessary to relate entities to be imported with new entities or manually populated entities, it will be possible to use the PrimaryKey field value of the new or manually populated entity.
F.E.:
In the old DB we have “Marketing Campaigns”:
Campaign:
name
id
description
pricelist(descriptive)
In MS CRM it’s now possible to define PriceList Entity but it’s decided to manually import the PriceList into CRM.
Then it will be possible, in the CRM DB, to see the GUID assigned to each item in the PriceList.

Or, in CRiMport, in the field relating PriceList Entity.

Then it will be possible to use the showed GUIDs in the field referenced to entity.
1) CRM SCHEMA DEFINITION
2) SCHEMA CHECK
3) STAGING DB CREATION
4) DATA MAPPING
5) IMPORT

Customize system entities and define custom entities.
- For any entity referenced
by other entities, there will be the need, in the import process, to define OLD_ID attribute with the name set
in the options menu: Options à “OLD_ID name”. In the following example, the
New_OLD_ID field will be added to Account Entity, that will be referenced by
other entities (f.e. Contact entity). The OLD_ID field must have the same name
in each entity.
Image – Set/Create OLD_ID Field

- It would be useful to
deactivate each workflow rule.
- It would be useful to
deactivate each callout (it could be done by renaming the callout config file)
In the CRiMport options, set
the CRM Server name.
Image
– Server name

Set the credentials used to
login to CRM Server. The user must have a CRM Administrator Role.

Use CRiMport to read metadata
(“Load Entity” button); CRiMport proposes both system and custom entity lists: Select the entities to be imported.
The selected entities will be
showed in a tree directory and it will be possible to check the settings of
each entity.
The light grey fields are “GUIDs”
and are used as record identifier.
The blue fields are “foreign
keys” fields. With a double click, it will be selected the referenced entity.
The green fields are
“picklists”. It’s possible to show the values list.
The violet fields are
“statuses”. It’s possible to show the values list.
The orange fields are
“OLD_IDs”.
Note: it’s not possible to
set a field exclusion. If there are fields not to be imported, insert NULL
value in the Staging DB.
Clicking on “Ordering”,
CRiMport will check the best entity import order. This is a non mandatory task.
Clicking on “CHECK OLDID”, CRiMport will check if the
OLD_ID field is missing in the selected and referenced entities.
If the OLD_ID misses by a
mistake, modify the CRM Schema and repeat the process from the step n.1.
It’s possible to import
entities without OLD_ID attribute; in this case, CRiMport will try to import
data using entity GUID as referenced field (light grey field).
If the OLD_ID attribute
wasn’t defined and CRiMport didn’t find any relation with the entity GUID, the
relation will be not imported (it will be check each record).
Clicking on “CREATE SQLServer
DB” and defining connection parameters, it’s possible to create a SQL Server DB
at once from CRiMport.
Otherwise, defining the
Staging DB name and clicking on “Generate SQL Server Script”, the Staging DB
will be created by script.
This step will insert the
script needed to generate Staging DB into the clipboard.
Open SQL 2000 Query Analizer
(or click “New Query” in Microsoft SQL Server Management Studio) and press
CTRL+V. Then, execute the script.
It’s also possible to
manually create the Staging DB on whatever OLEDB Database, following these
rules:
-
There must be a
table/view for each entity; the table/view must be called “import_” + entity
name.
-
Each table must
contain every field defined in the entity with a compatible data type.
-
Each table must
contain a GUID type field, called “CRM_GUID” and set to null (it will be valued
by CRiMport).
ONLY RECORDS WITH CRM_GUID SET TO NULL WILL BE
IMPORTED.
If it’s used SQL Server, it will
be possible to create DTS to quickly import whatever data type in the staging
DB.
Once the Staging DB is populated,
click on IMPORT button to start the import.
It’s possible to save your projects; the following informations will be stored:
-
DB
Connection String
-
CRM
Server name
- CRM Credentials (username, password, domain)
- OLD_ID name
To save the project is a needed action to run CRiMport in “Silent Mode”.
It’s possible to run CRiMport in Silent Mode; execute the following command from Shell:
CRiMport.exe <project file>
Example:
crimport.exe “c:\program files\CRiMport\Projects\TESTImport.crimport”
From the Option Menu it’s possible to select the Execution Mode.

If CRiMport isn’t run on CRM Server, it will be advised to use Fastest Mode.
The Fastest Mode is advised for Import run on CRM Server too; however be careful: CRiMport will start many TCP connections and it would cause some errors.
First workaround method: Read carefully the Microsoft KB:
Avoiding
http://msdn2.microsoft.com/en-us/library/aa560610.aspx
Alternative workaround method: Set a different Execution Mode:
-
Fast
Mode
-
Normal
Mode
-
Slow
Mode
-
Slowest
Mode