cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Model Driven Apps - Migrating Lookup Fields into Custom Entity

I am trying to upload 1000s of records into a custom entity on model driven Power Apps. I am able to read in text fields, option sets, dates, etc without any issue. However when I try to map lookup fields, I get an error that says "can't resolve the guid for the lookup field:...". I am able to select "Edit in Excel" in an entity where I can manually select the appropriate lookup choice. But i can not copy and paste the item name because it does not recognize it as a GUID. There is too much data to do this and I need a way to complete this in a programmatic way.

 

I essentially want to relate the Product IDs  (500004, 500370, etc) to the POBs (POB-1000, POB-1001, etc), as records that I can connect together after migrating the information to the model driven app.

Product ID Mapping.PNG

 

Error_Import.PNG

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User
Super User

Hi @Anonymous 

By far the best way to import relational data is using the dynamics 365 data import wizard.  Go to https://admin.powerplatform.microsoft.com/support and select environments then select the environment for your data.  In the top panel there is a gear marked settings.  Click on this and on the right side of the screen is an option called data import wizard.  There are nuances to using it so I suggest reading about it in the blog importing-data-in-microsoft-dynamics-crm/the-data-import-wizard-in-dynamics-crm/  first.  I have found that it works best if you create the entities first and assign the fields so that they match exactly the fields to be imported. Also check out https://survivingcrm.com/2011/11/crm-2011-data-import-wizard-in-practice/  in the section for mapping related records based on custom ID fields. This is not a comprehensive answer but it should get you started.  If you have already got the entities created then you can also use the template option for your preexisting data.Capture.PNG

View solution in original post

8 REPLIES 8
Drrickryp
Super User
Super User

Hi @Anonymous 

By far the best way to import relational data is using the dynamics 365 data import wizard.  Go to https://admin.powerplatform.microsoft.com/support and select environments then select the environment for your data.  In the top panel there is a gear marked settings.  Click on this and on the right side of the screen is an option called data import wizard.  There are nuances to using it so I suggest reading about it in the blog importing-data-in-microsoft-dynamics-crm/the-data-import-wizard-in-dynamics-crm/  first.  I have found that it works best if you create the entities first and assign the fields so that they match exactly the fields to be imported. Also check out https://survivingcrm.com/2011/11/crm-2011-data-import-wizard-in-practice/  in the section for mapping related records based on custom ID fields. This is not a comprehensive answer but it should get you started.  If you have already got the entities created then you can also use the template option for your preexisting data.Capture.PNG

View solution in original post

Anonymous
Not applicable

Thank you!! This has been much smoother then what I was trying from the start.

HI @Anonymous 

Happy to help.  I have spent weeks on importing relational data until I found this wizard.

Anonymous
Not applicable

So I have gotten the data import to work, and it properly connects all of the right records together. But for some reason, after about 5 minutes, all of my records on one side get deleted and the connections are lost. Have you ever had this problem?

Hi @Anonymous 

Wow, I haven't seen this behavior.  If you download the excel file from the entity is the data really gone?  

Anonymous
Not applicable

Yes, i import the data, it all looks great. Then I import another set of data and map it to the data I imported first. This allows me to create that lookup relationship to go between records. Then about 20 minutes later, 90% of the data disappears. The rest of the data leaves shortly after. 

 

Maybe there is something i deleted early on that was related to the record and once the system realizes they exist, it deletes them? I have no clue.

Anonymous
Not applicable

The record that deletes itself has a primary field that is an auto number and I am reading in my own Titles. Not sure if that could be the problem.

Anonymous
Not applicable

I must have deleted some parent entity or something related to the entity i was working with. I just migrated everything to a new entity and it all worked fine. Thanks again.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,597)