This record cannot be added because it already has a parent record RRS feed

  • Question

  • I have a custom entity, Project Designs, it is linked to a Order Detail i.e. a project design can have many associated order details.

    I then have a dialog which allows the user to link the order detail through to the project design this all works fine apart from if the user tries to associate the order detail to an existing project design.

    If I look at the order details, the lookup on the form is set on both order details to create the link to the project design, however if I click into common area on the left hand side of the form to view the linked project designs only one is associated to the project design.

    On the order detail that doesn't show the associated Project Design if I select "Add Existing Project Design", select the project design via the lookup I receive an error message "This record cannot be added because it already has a parent record".

    I am now at the limit of my knowledge of what to do next with this so any help would be appreciated.


    Tuesday, September 27, 2016 10:29 AM

All replies

  • I have just updated the relationship on the many to many side of things, published it and I still receive the same error.


    Tuesday, September 27, 2016 10:38 AM
  • Have just noticed, after editting the relationship to show display plural name, when I go into the order details and look at the common area I have two project designs showing, if I add a order detail to the top one I get the error, if I now add the order detail to the bottom one I do not receive the error and it adds as expected.

    So the question is now how do I remove the first project design?


    Tuesday, September 27, 2016 11:58 AM
  • Ok, so the issue is because the first relationship is 1:N and you cannot associate a record by adding to grid if the record is already associated to another record. that caused the issue.

    now to your second question to remove the first one, open entity Project design navigate to 1:N relationship and remove the relationship with order details. remove any dependencies

    If my response answered your question, please "mark the response as an answer" and also "vote as helpful". Regards, Hari. www.crm2011byhari.blogspot.com

    Tuesday, September 27, 2016 4:55 PM