web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Data import with lookup to related CSV and Dataverse

(0) ShareShare
ReportReport
Posted on by

I am trying to create a data map to allow me to import data for 2 related entities.

The entities I have are a parent "Schedule" entity with records that reference multiple child "Schedule Item" entity records.

The import will consist of 2 csv files zipped together, Schedule.csv and ScheduleItem.csv.

The ScheduleItem.csv includes a column called Shedule that needs to be used to reference the parent Schedule.  This parent may be either defined in the associated Schedule.csv file (for new schedules) or already exist in the dataverse (for existing schedules).

For parents defined in Schedule.csv, the column that needs to be matched in the Schedule.csv is called ScheduleTitle.

For parents that exist in the dataverse, the dataverse column that needs to be matched is called dcs_name and the entity is called dcs_schedule.

If I add the following lookup to the map then Schedule Items that have a parent entry in Schedule.csv are matched as expected but ones with parent schedules that already exist in the dataverse aren't (they error with "The lookup reference could not be resolved", also as expected).

    Schedule
    new_schedulenumber
    Process
    
        
            Source
            Schedule
            ScheduleTitle
            Process
        
    

If I instead add the following lookup to the map then this is reversed i.e. ScheduleItems with parent Schedules already in the dataverse will be matched and imported but those with parents listed as new schedules in Schedule.csv won't be an will error with "The lookup reference could not be resolved" (as expected).

    Schedule
    new_schedulenumber
    Process
    
        
            System
            new_schedule
            new_name
            Process
        
    

If I then add both options...

    Schedule
    new_schedulenumber
    Process
    
        
            System
            new_schedule
            new_name
            Process
        
        
            Source
            Schedule
            ScheduleTitle
            Process
        
    

I still only get the ScheduleItems with parents already existing in the dataverse importing.  The items with parents specified in Schedule.csv continue to fail with "The lookup reference could not be resolved".  This is despite the fact that these will import correctly if I delete the LookupType>System</LookupType> map from that block.

What do I need to do to get both of these working together?

Thanks

Alan

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hi Alan,

    Maybe you can refer the following link:

    https://softchief.com/2021/06/18/import-related-entity-records-using-data-import-in-dynamics-365-ce-importing-lookup-fields/  

  • Milansinh Raj Profile Picture
    230 on at

    Hello Alan Roberts ,

    May I know how we are importing both file together ?

    What process you are using to import here?

  • Alan Roberts Profile Picture
    on at

    Hi Milansinh Raj,

    for my testing I am just adding both csv files to a zip file and importing via the classic Data Import Wizard (settings/data management)

    Cheers

    Alan

  • Alan Roberts Profile Picture
    on at

    Thanks , sadly I haven't been able to make any further progress using that article.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 74

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans