Compartir a través de


Prepare source files for import

 

Applies To: Dynamics CRM 2013

Before you can import data into Microsoft Dynamics CRM, you must create the source data files.

The data source files that you use in an import must be formatted as comma-separated values (.csv), XML Spreadsheet 2003 (.xml), or text files. The use of source files enables the transfer of data from database systems that use different formats into Microsoft Dynamics CRM.

A source file may contain data for one entity type or multiple entity types, such as accounts and contacts. For the source files that contain multiple entity data, you must provide a map that includes the <EntitiesPerFile> tag. Set the value of this tag to “Multiple” to indicate that there is more than one entity type in the source file. Add the Dedupe = “Eliminate” attribute to the <EntityMap> tag. This assures that if the file contains duplicate rows for the entity type, a single row is used to minimize lookup related errors.

An example of the data map with multiple entity types can be found in this location of the SDK:

SDK\Resources\DataImportMaps\MapForSalesForceContactAccount.xml

Download the Microsoft Dynamics CRM SDK package.

The field values in the source file can be separated by commas, tabs, or other characters that are defined in the ImportFile.FieldDelimiterCode attribute.

Note

Do not use non-printable characters, null (\0) or break (\b), as delimiters for the field values.

The first row in the source file should contain column headings. If you do not include headings, use the ImportFile.IsFirstRowHeader attribute to specify that the first row represents actual data. In this case, default column headings are created with the names Col1, Col2, and so on.

See Also

Import data
Create data maps for import
Blog Post: How to Import attachments programmatically