Skip to main content What is Dynamics 365? Guided tours Customer stories Try our products Build your own agents CRM ERP Sales Service Sales Customer Insights Customer Service Contact Center Field Service Supply Chain Management Commerce Finance Project Operations Human Resources Business Central Pricing Business application topics Training & certifications Migrate to the cloud Documentation Events Dynamics 365 Blog Product updates Onboarding and implementation Community Find a partner Software Development Companies Partner resources Microsoft Marketplace Product documentation Technical support On-premises product support Contact us Try for free Sign in
  • 1 min read

Data Migration and Import: Using field delimiter characters in the source files


To run data import and data migration, you have to prepare a source file that contains the data you want to import. The data source files must be formatted as comma-separated values (CSV) files. The field values in the source file can be separated by commas, tabs, or other characters that are defined in the importfile.fielddelimitercode property.

Each source file must contain data of one entity type, such as accounts, leads, or competitors.

The first row in the source file should contain column headings. If you do not include the headings, use the importfile.isfirstrowheader property 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.

Important:

Do not use any non-printable characters, such as newline (\n) or return (\r) characters, as delimiters for the field values. If you use a non-printable character, you will get a run-time error, such as the following DataColumnsNumberMismatch error:

   
      80040345
      DataColumnsNumberMismatch
      The number of fields differs from the number of column headings.
   

The rows of data that contain non-printable field delimiter characters are not imported.

For a complete list of error codes, see Error Codes.

However, if you want to use non-printable characters as field delimiters in your source data files, you have to install a hotfix.

For more information regarding the hotfix, please refer to the following Knowledge Base article: https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?scid=kb;en-us;948987.

For more information about how to create and prepare CSV source files for import and data migration, see the Microsoft Dynamics CRM online Help.

Inna Agranov

Get started with Dynamics 365

Drive more efficiency, reduce costs, and create a hyperconnected business that links people, data, and processes across your organization—enabling every team to quickly adapt and innovate.