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
Bill_GBill_G 

One to many relationship from one customer object to another

Probably a stupid question, but I cannot figure this out.

I have a custom object that we will called "Main information".  This has simple info.  Then I have another custom object that we will name "Distribution List".  What I am looking to do is have multiple "Distribution Lists" tied to one or more "Main Information" records.

Example:
"Main Information" name = Test 1234
"Distribution List" name = List 1
"Distribution List" name = List 2
"Distribution List" name = List 3

List 1, 2, and 3 all tie (join) to Test 1234.

Then I add a "Main Information" name = New 1234, and want to tie Distribution List 1 and 2 to this new "Main Information" record.

Something like this...
                                     Custom Object 2           
                                 /
Custom Object 1  -     Custom Object 2
                                 \
                                     Custom Object 2
                                  /
                                 /
Custom Object 1    -   Custom Object 2


Possible?  All I am able to get is one lookup field at the "Disribution List" level, so I can only associate the Distribution List with one "Main Information" record.

Thanks.

Message Edited by Bill_G on 03-06-2006 03:17 PM

andyCandyC

What you are describing is a Many-to-Many relationship - a Distribution list item can appear on multiple Main Information records and a Main Information record can have many Distribution lines

You can resolve this by having a third custom object, such that:

Keep your custom object for Main Information (1)

Keep your distribution list object (2), but remove the link to Main Information.

Create a third object that holds the IDs from the objects 1 and 2 above. You then create a record in this object for each relationship.

It's basically how you'd do it in a regular relational database.

Hope it helps.

  

Bill_GBill_G
Thanks for the reply.  I guess what I am really looking for is something like the account to contact relationship, which is a one to many relationship.  But looks like you cannot do this with custom objects.