This documentation is archived and is not being maintained.

Introduction to Data Management Features in the Microsoft Dynamics CRM 4.0 SDK

Inna Agranov
Microsoft Corporation

February 2008


Read about new data management features in Microsoft Dynamics CRM 4.0 that include Bulk Delete, Duplicate Detection and Data Migration/Import.

Applies To

Microsoft Dynamics CRM 4.0

Microsoft Visual Studio 2005


Microsoft Dynamics CRM 4.0 introduces a set of new and exciting features that greatly improve the way you manage and maintain the quality of data in your system. These new features include Bulk Delete, Duplicate Detection, and Data Migration/Import.

Although all three features are available in the Microsoft Dynamics CRM Web application, you can address your unique business requirements by developing custom applications and tools using a set of data management APIs. These APIs are described in the Microsoft Dynamics CRM 4.0 Software Development Kit (SDK).

The Data Management documentation in the SDK gives you in-depth information about each of these features and provides a complete programming reference. It also includes an ample amount of sample code that shows you how to use these features.

Bulk Delete

The bulk delete feature helps you manage system storage consumption and maintain data quality by freeing the system from old, obsolete, or invalid data. Now, you can run a bulk delete job to quickly and easily delete stale data, old test and sample data, or data incorrectly imported from other systems. Bulk delete runs asynchronously in the background without blocking your other activities. The specified entity instances are deleted according to the cascading rules. Bulk delete can be performed on all entities that are supported by the Delete action. For a complete list of entities, see Delete Message.

For more information, see Bulk Delete.

Duplicate Detection

The duplicate detection feature helps you maintain current, up-to-date high quality data. You can detect duplicates during single create or update operations, or run duplicate detection as an asynchronous job in the background. You can also detect and retrieve duplicates of a particular entity instance by using the RetrieveDuplicates message. For example, you can find all the contacts that are duplicates of a particular account entity instance. The duplicates found by the duplicate detection asynchronous job are stored as duplicate record entity instances and can be retrieved by the Retrieve and RetrieveMultiple messages.

Duplicate detection can be enabled during data import to prevent the duplicate data being introduced into the system. All duplicate data detection is based on duplicate detection rules that you have to create and publish before you perform the duplicate detection. You can disable duplicate detection globally or for an entity type by unpublishing the duplicate detection rules, or by deleting the published rules. To delete the duplicates, you can run a bulk delete job.

For more information, see Duplicate Detection.

Data Migration and Import

The data migration and import features let you upload data from various customer relationship management systems and data sources into Microsoft Dynamics CRM. You can import data into standard and customized attributes of most entity types, including custom entities. During migration, you can upload related data of different types, such as notes and attachments. Data import lets you import new data or update existing data in Microsoft Dynamics CRM.

Microsoft Dynamics CRM includes two tools for importing and migrating data. Both tools run on the local computer. Import Data Wizard is a Web application that is used for importing multiple data records from a single comma-separated values (CSV) file. Data Migration Manager is a stand-alone tool that is used for migrating data from one or more CSV files.

The SDK provides additional functionality for data migration that is not available in the Microsoft Dynamics CRM Web application. For example, to map source data and entity attributes, you can create data maps that include complex transformation mapping, such as concatenation, split, or replace. You can build custom error reporting tools with improved error logging views and view source data inside the temporary parse tables.

Data migration and data import use common entity model and messages. However, there are some differences in the feature sets of the two operations.


Feature Data Migration Data Import

Import data into Microsoft Dynamics CRM

Yes (Only the system administrator can migrate data in the offline mode.)

Yes (All users who have appropriate permissions can import data.)

Import data into custom entity types and attributes



Use multiple source files that contain related data


No (You can only import one file at a time.)

Assign entity instances to multiple users


No (All entity instances are assigned to one user.)

Update existing entity instances



Detect duplicates

No (You can run duplicate detection after you migrate the data.)


Delete all entity instances associated with one job

Yes (Use bulk delete feature.)

Yes (Use bulk delete feature.)

Automatically map data based on column headings in the source file



Set the value of the createdon attribute for the entity from source data



Customize Microsoft Dynamics CRM to match source data

No (Custom entities and attributes can be created by Data Migration Manager.)

No (Customization must be done before import.)

Apply complex data transformation mapping



Import state and status information



Data import runs directly on the Microsoft Dynamics CRM server. Although data migration can run on the Microsoft Dynamics CRM server, we recommend that you run data migration on a local system in the offline mode. This will significantly reduce the usage of server resources. When data is ready for migration, you can upload the data to the server.

For more information, see the Data Migration and Import.

Additional Information

Download the Microsoft Dynamics CRM 4.0 Software Development Kit (SDK) from the MSDN Developer Center.

For more information, see Data Management.

Send Us Your Feedback about this Article

We appreciate hearing from you. To send your feedback, click the following link and type your comments in the message body.

The subject-line information is used to route your feedback. If you remove or modify the subject line we may be unable to process your feedback.

Send Feedback