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.
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.
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.
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.
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?
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,867 Super User 2024 Season 2
Martin Dráb 229,173 Most Valuable Professional
nmaenpaa 101,156