Microsoft Dynamics 365 has built-in functionality that allows you to export a configuration from one environment, and import it into another environment. Export/import functionality makes it easier to copy object and field mapping configurations from one environment to another environment without the data (for example, from a development instance to a production instance). You export a configuration to a Microsoft Excel file (.xlsx), then import that file to create the mapping data in the target org.

The primary configuration for Data Sync using the connector involves mapping objects and fields. It is not recommended to use export/import functionality for Connections, Sync Groups, or Select Options mappings.

To export and import a configuration

  1. Open the connector.
  2. Click Map Objects.
  3. From the header, click Export to Excel (depending on your screen resolution, you may have to click the "More" menu to see this option). The file is processed and downloaded to your computer.
  4. In a separate tab, log in to the target environment where you want to import the configuration.
  5. Open the connector and click Map Objects.
  6. From the header, click Export to Excel. An empty Excel file created. The columns in this file must exactly match the columns in the Excel file that includes the data to be imported.
  7. Open the Excel file you exported from the source environment.
  8. Select all data in the file (do not include the column headings) and copy it to the clipboard.
  9. Open the Excel file you prepared for import (from Step 6). Select the first cell under the first column heading and paste the data from the other Excel file.
  10. Verify that the columns and data are copied correctly. Make any changes if necessary.
  11. Return to the Dynamics 365 environment where you will perform the import. Click Map Objects
  12. From the header, click Import from Excel (again, depending on your screen resolution, you may have to click the "More" menu to see this option).
  13. Next to File Upload, click Choose File. Browse to the Excel file with the data to be imported, select it, and click Open.
  14. Click Next.
  15. (Optional) Click Review Mapping to view the mappings in the Excel file.
  16. Click Finish Import. The import process is executed.
  17. Return to the source environment and click Map Fields.
  18. Repeat Step 3 – 16 to export and import field data into the target environment.

Troubleshooting

Following the steps as described above should result in an import with no errors, as long as the target environment does not contain the data exported from the source environment. In some cases, manual modifications to either Excel file may result in some records not being imported. If there is a problem with the Excel file during the import process, Dynamics 365 will usually display a warning to the user.

If the import fails but no error messages are displayed, follow these steps to locate the import error report:

  1. Go to Advanced Settings > Settings > Data Management > Import.
  2. Click the link under Import Name that corresponds to your import job (it will match the filename of the file you imported).
  3. View data in the log that is displayed, showing all rows in the Excel file that failed as part of the import.

There is no descriptive information displayed in the log that will pinpoint the exact reason for any failure. If you want to investigate further, check the number provided in the Error Code column. Convert this decimal to a hexadecimal and run a search in your browser using the numeric value of the hexadecimal. You should find the error code in Microsoft's documentation.