Capgemini / xrm-datamigration

Export and import data for Microsoft Dataverse. Supports JSON and CSV.
MIT License
24 stars 11 forks source link

Error when original guid does not exist in the source file for mapped reference field #19

Closed ksulikow closed 3 years ago

ksulikow commented 3 years ago

Describe the bug When export config contains fields mappings defined, but has the reference field excluded from export, the original guid will not be included in the exported data. It will cause error and fail during import.

To Reproduce Create export config file and configure lookup mapping and add the field to excluded fields "ExcludedFields": [ "systemuserid", "roleid", "systemuserrolesid", "businessunitid" ], "LookupMapping": { "systemuser": { "systemuserid": [ "domainname" ], "businessunitid": [ "name" ] }, "systemuserroles": { "systemuserid": [ "domainname" ], "roleid": [ "name", "businessunitid" ] } }

Expected behavior In this situation if lookup value can be found in the target system then it should be used, if not it should be left empty

Additional context Fatal error during import