+ Start a Discussion

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.

"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.


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


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.


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.