function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
crusoeda12crusoeda12 

Relating object back to itself (many times)

Hi there, 

 

I have a list of products, and would like to relate each product to other products. I can create a lookup relationship, but this isn't quite right; each product has one, but in most cases more, related projects. How can we create this relationship?

 

I have tried:

 

Master-Detail through a connector object (doesn't seem to work, since the connector objects have to be unique)

Lookup relationship (doesn't seem to work because the lookup can only be to a single instance of each object)

 

Any other ideas?

 

Thanks!

--Dave 

davecrusodavecruso

So, I think I have one solution:

 

Instead of building the normal Connector object for Many > Many, I created 1/2 of that. The parent object is the same (in this case, PRODUCT, but the second field on the object is a lookup.

 

This creates the perception of multiple related items, through a connector, to the object itself. So:

 

PRODUCT 1 > Connector > Product 1 (Master-Detail) Product 2 (Lookup)

 

Any reason this will blow up my app?

 

Thanks!

--Dave