First this is my first time posting and I am definitely very new to Dynamics and the CDS. I am a noob so apologize if asking the obvious.
We are building a Application using Dynamics Customer Service to replace the legacy software used for managing clients for 3 Early Cancer Detection Programs. At it's heart it is very much a CRM thus why we went with Dynamics. Anyway, I haven't worn a Technical Architect Hat in a very long time but find myself jumping back into the role temporarily after my previous Architect quit and from what I can tell left a mess. I'm basically revisiting and questioning pretty much everything. Anyway to get to the point I'm looking for some advise on how best to handle the following.
We have 3 foundational Entities
In General the Relationship between these Entities is as Follows
Back in the day without trying to work within the constraints of Dynamics and the CDS I would have simply done the following
However, I'm not entirely sure the best way to do this with the CDS and Dynamics Customer Service. My first instinct is to:
Where I am struggling is how to do the relationships.
Should I do a Many-to-Many thing between records in the Contact Table to link Providers and Clients? I'm thinking I should use a Custom Table so I can add the Primary Column to identify which one is Primary. I thought of just using the Connection Entity to create a Connection between Providers and Clients but it's use strikes me as confusing to the end users and there is a Business Rule were if they make one Provider the Primary the system should automatically unflag any previous provider that was marked Primary (not sure how to do that with Connections).
I think the Provider Clinic Relationship is more straight forward and I would do either something similar as done above between Providers and Clients but with would be between the Account Table and the Contact Table or I could just trust in the CDS Power Apps created many-to-many relationship?
Any advise would be appreciated as this is the foundational relationships so I want to make sure we do it in the best way for simplicity to understand, flexibility, and future scalability.
I should note that my Development Team is even less experienced than myself with Dynamics. They have solid SQL Server Relation Database experience so I'm trying to do this in way that makes sense to them.
Thanks
Thanks Leah, that was what I would have done in the past. I was messing around with relationships last week and yeah it got ugly fast. However, I really think we should be using the Contact Entity for our Clients otherwise we will be missing out on most of the benefits that come with Dynamics CRM. It may be easiest to just create a Custom Provider and Facility Enitity however that would simplify the relationship issue a lot.
Hi ThatGuy306,
My suggestion is to create three custom entities instead of using OOB account and contact entities.
There are some OOB relationships between account and contact entities, creating custom relationships would make the scene confusing.
1.Create custom entities:
Create an entity in Dynamics 365 Customer Engagement (on-premises) | Microsoft Docs
2.Build relationships:
Types of entity relationships in Dynamics 365 Customer Engagement (on-premises) | Microsoft Docs
(1) Clients can have many Providers, Providers can have many Clients
N:N relationship between Client and Provider
(2) Providers work out of many different Clinics
N:N relationship between Clinic and Provider:
(3)but one will be the Primary Provider; but one Clinic will be the Primary Clinic
1:N relationship between Provider and Client, 1:N relationship between Clinic and Provider
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,912 Super User 2024 Season 2
Martin Dráb 229,355 Most Valuable Professional
nmaenpaa 101,156