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
TeddyAble1TeddyAble1 

[HELP] Relationship Issue

Hi All

I have two objects
  • Courses__C
  • Contact 
Many exisiting Students can sign up to course a 
and one student can be connected to multiple courses.

Using the lookup relationship field only does one to one and then you have to create contacts rather than just picking and choosing the individual courses.

How can this be determined guys?

Please help out

Regards
Best Answer chosen by TeddyAble1
Amit Chaudhary 8Amit Chaudhary 8
You can create the junction object to create the many to many relationship between two object.

Please create one new object enrollment with two lookup.
One is Contact lookup and 2nd will be course lookup.

in that one student can enrolle in multipe course and multiple course can be enrolled by multipe student.

All Answers

Rupal KumarRupal Kumar
Hi,
You Create a Many-to-Many Relationship.
You can use master-detail relationships to model many-to-many relationships between any two objects. A many-to-many relationship allows each record of one object to be linked to multiple records from another object and vice versa. For example, you may have a custom object called “Bug” that relates to the standard case object such that a bug could be related to multiple cases and a case could also be related to multiple bugs. When modeling a many-to-many relationship, you use a junction object to connect the two objects you want to relate to each other.

A custom object with two master-detail relationships. Using a custom junction object, you can model a “many-to-many” relationship between two objects.
More info-https://help.salesforce.com/HTViewHelpDoc?id=relationships_manytomany.htm


Thanks
Rupal Kumar.
http://mirketa.com
Himanshu MaheshwariHimanshu Maheshwari
Hi,

For having many to many relationaship you need use Junction Object. Use the below link to know more about junction objects.

https://help.salesforce.com/HTViewHelpDoc?id=relationships_manytomany.htm
 
Amit Chaudhary 8Amit Chaudhary 8
You can create the junction object to create the many to many relationship between two object.

Please create one new object enrollment with two lookup.
One is Contact lookup and 2nd will be course lookup.

in that one student can enrolle in multipe course and multiple course can be enrolled by multipe student.
This was selected as the best answer
TeddyAble1TeddyAble1
Thank you Amit

that was to the point.

Regards