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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Self Referencing Custom Entity

(1) ShareShare
ReportReport
Posted on by

We are testing out an upgrade from 2011 to 2015.  We have a custom entity named Product Codes that is self referencing.  In our 2011 environment we were able to relate a Product Code to itself in a Parent-Child Relationship.  These upgraded to 2015 without issues as below.

.SelfReference.PNG

The problem is that we can no longer add new product codes in this manner.  When trying to add the relationship to the product, it is not available in the list.

Is this no longer allowed?

Thanks,


Dan

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hey Dan,

    Self Referencing relationships can be achieved in CRM 2015, but they are tricky. If you have to search for a the record (Ex. Searching for Product Code A on the Product Code A form), you will not be able to find the record.

    project-search-2.PNG

    However, if you type the exact name of the record into the lookup field and hit the Tab key to auto-complete the search, it will add the record to itself.

    project-search-2.PNG

    A problem occurs if you have records with the same or similar names. A work around for this could be to create a workflow that you run manually that adds the record to itself using a dynamic value {product code{product code}}. This way you don't have to search, and it will always be the same project.

    If this is too convoluted, I might suggest simply creating a new parent Product code with the same name as the one you want to add with some sort of parent/child designation. 

    Hope this helps!

    -John

  • Community Member Profile Picture
    on at

    Hi John,

    Thanks for your reply.  This is a great tip for 1:M relationships, unfortunately we are using a M:M relationship where you add the product code through a subgrid and not the lookup on the form.

    I am going to look at the workflow idea though.  I might be able to figure that out.

    Thanks!

  • Aileen Gusni Profile Picture
    44,524 on at

    Dan,

    You got error that cannot be referenced because of duplicate or self same entity?

    Thanks

  • Community Member Profile Picture
    on at

    There is no error.  The product code just won't show up in the lookup or search.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans