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

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Need help figuring out how to populate a lookup field on import (OOTB)

(0) ShareShare
ReportReport
Posted on by 5

Hi,

I'm taking over a solution built by a consultant have looked through all the documentation they left, but could not figure out one final piece.   We have a custom entity called Patient Outreach Program that has a N:1 relationship to the contact entity.  We do outreaches to our patients for specific programs (annual wellness, colonoscopy screening, etc).  My task was to create a new program for diabetes and I have set up everything like the previous programs as far as I can tell, except for one thing that isn't working.

When we import new records into this Patient Outreach Program entity for programs created by the consultant, the lookup field in the contact entity gets automatically populated to point to the related record in the Patient Outreach Program entity.  But for the new program I created for Diabetes outreach, the Patient Outreach Program records are created but the lookup field in the contact entity is not being populated.  I thought maybe the consultant created a workflow to do this, but there is none.  I also thought maybe Dynamics would do this automatically but it doesn't seem to be doing that either.

Currently at a loss and hoping others here have suggestions for how a lookup field can be populated on the "1" side of a N:1 relationship automatically when importing records into the "N" side.

I have the same question (0)
  • Suggested answer
    srichard1234 Profile Picture
    5 on at
    RE: Need help figuring out how to populate a lookup field on import (OOTB)

    You're absolutely correct! This is a bonkers way to go about it. I think the consultant put a lookup in the contact entity to the custom entity because it's easier to display that in the UI of the form.  But it doesn't really make sense.

    I'll re-do my power automate flows to pull from the patient outreach program instead of the contact and use it's lookup field to pull in the contact entity properties.  I'll try filter the entity based on Program Name instead of ID otherwise I'll have to have a different ID between sandbox vs production environments.

    Thanks for the reply to help me re-think what I'm trying to do as bad design. I still don't know how the consultant populated the lookup field in the contact entity, but it doens't matter. I'm going to use the lookup field in the custom entity instead and just forget about the lookup field in the contact entity.

  • srichard1234 Profile Picture
    5 on at
    RE: Need help figuring out how to populate a lookup field on import (OOTB)

    Thanks for the suggestion. We're not using the OOTB import from Excel.  we're using Kingswaysoft in SSIS packages to populate CRM Dynamics from our Cerner EHR.  But after more thought, I think I'm going about this entirely the wrong way and I think the way the consultant did this is bonkers! I'm going to redo my data flows to pull from the custom entity which has the lookup to the contact and not the other way around.   Just makes more logical sense to me.

  • Leah Ju Profile Picture
    Microsoft Employee on at
    RE: Need help figuring out how to populate a lookup field on import (OOTB)

    Hi srichard1234,

    Where is the lookup field that needs to be populated located? on the trial entity?

    Based on the relationship(a custom entity called Patient Outreach Program that has a N:1 relationship to the contact entity) you mentioned, it should be on the custom entity.

    If so, you can add lookup column to the file that you need import, then map it to contact entity.

    pastedimage1683177708276v1.png

    https://coderscollection.wordpress.com/2018/03/15/setting-data-management-data-maps-data-import/ 

    However, you also mentioned that the lookup field in the contact entity is not being populated.

    So I'm confused, can you share a screenshot to help me understand?

  • Suggested answer
    Mohamed Irfan Profile Picture
    90 on at
    RE: Need help figuring out how to populate a lookup field on import (OOTB)

    Hi,

    Did you check whether the mapping was done for that lookup field?

    You can go through this blog for the import steps - OOTB Import

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

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

#1
DAnny3211 Profile Picture

DAnny3211 433

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 137 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 67 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans