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

  • Alan Roberts Profile Picture
    Alan Roberts on at
    RE: Data import with lookup to related CSV and Dataverse

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

  • Alan Roberts Profile Picture
    Alan Roberts on at
    RE: Data import with lookup to related CSV and Dataverse

    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

  • Milansinh Raj Profile Picture
    Milansinh Raj 228 on at
    RE: Data import with lookup to related CSV and Dataverse

    Hello Alan Roberts ,

    May I know how we are importing both file together ?

    What process you are using to import here?

  • RE: Data import with lookup to related CSV and Dataverse

    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/  

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans