Issue with reciprocal lookup field for spouses – can’t associate records due to parental relationship

  • Issue with reciprocal lookup field for spouses – can’t associate records due to parental relationship

    Posted by DSC Communities on January 13, 2022 at 10:10 pm

    Issue with reciprocal lookup field for spouses – can’t associate records due to parental relationshipFollow
    Lucas Hewitt
    Lucas HewittJan 13, 2022 09:56 PM
    I have field on the contact record called “Spouse Lookup”. This is a lookup field to the contact table, …
    1. Issue with reciprocal lookup field for spouses – can’t associate records due to parental relationship

    GOLD CONTRIBUTOR
    Lucas Hewitt
    Posted Jan 13, 2022 09:56 PM
    I have field on the contact record called “Spouse Lookup”. This is a lookup field to the contact table, so N(Contact):1(Contact).

    I can populate the field just fine on one record – Spouse A has Spouse B in the Spouse Lookup field – but when I try to add the other spouse – Spouse B has Spouse A in the Spouse Lookup field – I get the following error:

    “Cannot associate records

    This lookup creates a parental relationship between records and you attempted to link this record to itself. This is not allowed because it would create a circular reference. You can link this record to other records of the same type, but not the same record.”

    Why is this? Can I not have two records reference each other with a referential lookup relationship?

     

    ——————————
    Lucas Hewitt
    Enterprise Application Specialist
    Ethnos360
    ——————————

    2. RE: Issue with reciprocal lookup field for spouses – can’t associate records due to parental relationship

    TOP CONTRIBUTOR
    Donal McCarthy
    Posted Jan 14, 2022 03:10 AM
    I tried this and got the same message!

    ——————————
    Donal McCarthy
    BrightWork 365 Solution Architect
    BrightWork
    Galway
    ——————————

     

    3. RE: Issue with reciprocal lookup field for spouses – can’t associate records due to parental relationship

    GOLD CONTRIBUTOR
    Lucas Hewitt
    Posted Jan 14, 2022 11:26 AM
    Hey Donal, thank you for replicating the issue! Now I know I’m not crazy 🤪

    ——————————
    Lucas Hewitt
    Enterprise Application Specialist
    Ethnos360
    ——————————

     

    4. RE: Issue with reciprocal lookup field for spouses – can’t associate records due to parental relationship

    TOP CONTRIBUTOR
    Ryan Perry
    Posted Jan 14, 2022 10:51 AM
    Hi Lucas.

    I recall running into this years ago. If I recall, you should be able to set the relationships on the fields as referential or configurable cascading to get around this. What you cannot have is a circular referential parental hierarchy.

    Give it a try and let me know if that fixes for you.​​

    ——————————
    Ryan Perry
    Business Systems Analyst
    The Helpful Bit
    ——————————

     

    5. RE: Issue with reciprocal lookup field for spouses – can’t associate records due to parental relationship

    GOLD CONTRIBUTOR
    Lucas Hewitt
    Posted Jan 14, 2022 11:07 AM
    Thanks for the reply!

    The relationship is already set as Referential. I tried changing it to configurable cascading setting all the options to “cascade none” but it just reverts back to referential since I basically just recreated it.

    That’s what’s confusing me – it’s acting Parental while set as Referential…

    ——————————
    Lucas Hewitt
    Enterprise Application Specialist
    Ethnos360
    ——————————

     

    6. RE: Issue with reciprocal lookup field for spouses – can’t associate records due to parental relationship

    TOP CONTRIBUTOR
    Ryan Perry
    Posted Jan 15, 2022 12:30 AM
    Edited by Ryan Perry Jan 15, 2022 01:02 AM
    HI Lucas….

    I know this is definitely possible. If I recall, the error is actually the result of a different relationship – one of the OOB fields – though I can’t recall the specific one at the moment. To prove my point, as an example, if you create a custom entity, reciprocal relationships work fine. I’ll think on this and if I remember the workaround, will be sure to fill you in.

     

    Fore reference:
    https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide/gg328297(v=crm.8)?redirectedfrom=MSDN#self-referencing-one-to-many-entity-relationships

     

    ——————————
    Ryan Perry
    Business Systems Analyst
    The Helpful Bit
    ——————————

     

    7. RE: Issue with reciprocal lookup field for spouses – can’t associate records due to parental relationship

    GOLD CONTRIBUTOR
    Lucas Hewitt
    Posted Jan 17, 2022 10:34 AM
    Thanks Ryan! Here’s hoping you can remember!

    ——————————
    Lucas Hewitt
    Enterprise Application Specialist
    Ethnos360
    ——————————

     

    8. RE: Issue with reciprocal lookup field for spouses – can’t associate records due to parental relationship

    SILVER CONTRIBUTOR
    Vanessa Lopez
    Posted Jan 18, 2022 11:20 AM
    Hello,
    Have you tried changing the relationship to N:N? I know it may sound odd but essentially it seems like you are trying to associate a child to a parent and then a parent to a child as a parent even though that is not the type of relationship you selected. It inherently assumes it is that way because of the N:1 association. The other way around this would be to create a grid on the Spouse B record showing the Spouse A spouses but that seems silly to me.
    Good luck!

    ——————————
    Vanessa Lopez
    Black Knight Financial Services
    Jacksonville FL
    ——————————

     

    9. RE: Issue with reciprocal lookup field for spouses – can’t associate records due to parental relationship

    GOLD CONTRIBUTOR
    Lucas Hewitt
    Posted Jan 18, 2022 02:10 PM
    Hey Vanessa, thanks for the response!

    Stupid question – how do I set a lookup field to a N:N relationship? I know how to create the relationship itself but I can’t figure out how to change the settings for the column itself.

    ——————————
    Lucas Hewitt
    Enterprise Application Specialist
    Ethnos360
    ——————————

     

    10. RE: Issue with reciprocal lookup field for spouses – can’t associate records due to parental relationship

    SILVER CONTRIBUTOR
    Vanessa Lopez
    Posted Jan 18, 2022 07:10 PM
    Hey there,
    Sorry but I was testing things out finally and was not able to associate the relationship after the fact. I was hoping that would be an easy solution. You probably need to just create a small sub grid view on the form and use that with a N:N relationship. You will have to determine the best way to house the “parent” like a primary contact checkbox and then make the spouse the child. You can also make it a show/hide so the grid only shows if the primary box is not selected but you can default it to true.
    Good Luck!

    ——————————
    Vanessa Lopez
    Black Knight Financial Services
    Jacksonville FL
    ——————————

     

    11. RE: Issue with reciprocal lookup field for spouses – can’t associate records due to parental relationship

    GOLD CONTRIBUTOR
    Lucas Hewitt
    Posted Jan 18, 2022 09:59 PM
    No worries! Thank you for testing that out for me!

    ——————————
    Lucas Hewitt
    Enterprise Application Specialist
    Ethnos360
    ——————————

    replied 11 months, 3 weeks ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘Issue with reciprocal lookup field for spouses – can’t associate records due to parental relationship’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for people  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!