Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]

This is one of the most common scenarios where you want to import an entity’s data in Dynamics 365 that has reference to some other entity. And the Lookup’s data is not yet created resulting in the Lookup reference missing. Just like below –


And resulting into the below –

And similarly while importing Contacts, the Account might not be already imported. And you get the error ‘The lookup reference could not be resolved

Most common scenario in Dynamics 365 implementations is importing Accounts and Contacts. The Primary Contact tried to lookup an already existing Contact and hence, fails.


Now, in order to handle such scenario, best and the most simple way is to import this together!

  1. Select both files and add them to a zip file –
  2. Name it something appropriate
  3. And import this in the Import Wizard in Dynamics 365 CRM.
  4. You’ll see the files being included in the zip you selected.
  5. After you review your mappings, you can confirm and Submit for Import.
  6. There will be 2 jobs submitted and hence, 2 Imports will be created.


Now, if you check, both the Lookup references will be maintained.
Account will have the created Contact filled in Primary Contact and Contact record will have Account mapped in the Company Name field (or as per your mappings.)


In case you might want to look at some more Dynamics 365 CRM posts, you can check below –

  1. Mailbox Alerts Hide/Show behavior in Dynamics 365 CRM
  2. Dynamics 365 PSA v2 to v3 Upgrade failed? Here’s what to do.
  3. Refresh button missing on Roll-Up fields in D365 UCI? Quick Tip.
  4. Store ‘Today’s Date’ in a field to use in workflow conditions in D365 CE
  5. Excel Importing Notes (Annotation) entity in Dynamics 365 CRM
  6. Kanban view in Dynamics 365 Sales | 2020 Wave 1 Early Access Feature
  7. Time/Expense Entry Rejection comments in D365 PSA v3
  8. Custom View Filter JS code not working in Dynamics 365 CE. Why? [Quick Tip]
  9. Show Loading Screen in Dynamics 365 using Client API reference
  10. Accessing multiple occurrences of a field in Business Process Flow using JS in D365 CRM

Hope this helps!

D365 Quick Tip: Delete Records Imported by mistake

One of the most common blunders often made in Data Import are importing whole lot of records without finalizing.

And when you import, you realize you needed to add something more to the Import or some things were pending in the Excel file and you ended up uploading them all!

Delete Imported Records

  1. Assuming your Import was successful and you want to now just revert what all was imported, navigate to Settings > Data Management > Imports.
  2. Open the Import job and look for the option under Delete which says ‘All Records Imported to This Entity During This Import
    There, quite self explanatory.
  3. Once you click on it, a Delete Job is triggered once you fill in the below information
    Important: When I select ‘In addition to deleting imported records, also delete import job history’, it will also delete the Import Job I started in Step #1. If you still want to keep it, you can according to your personal preference.
  4. Now, when you go to Settings > Data Management > Bulk Record Deletion, find the Import you started in the step above.
    Note that there are 4 records deleted here though I imported 3 records. The additional record is of the Import Job deleted while setting up the Deletion job in step#3 above.

Hope this quick tip helps! 🙂