• #26582
     kapil #628
    Forcetalks

    How to create many to many relationships between two Salesforce Objects?

    How to create many to many relationships between two object?

     

    #26589
    Salesforce | PRANAV PRANAV #680
    Forcetalks

    Hi Kapil,

    When modelling a many-to-many relationship, you use a junction object to connect the two objects you want to relate to each other.

    Creating the many-to-many relationship consists of:

    • Creating the junction object.
    • Creating the two master-detail relationships.
    • Customizing the related lists on the page layouts of the two master objects.
    • Customizing reports to maximize the effectiveness of the many-to-many relationship.

    For reference search salesforce documentation “Create a Many-to-Many Relationship”.

    Hope this helps you.

    #26605
    Salesforce | Archit Archit #24
    Forcetalks

    Hello Kapil,

    We can create many – to – Many relationship by using junction object. Junction object is a custom object with two master detail relationships.

    Thanks!

    #35057
    Salesforce | Parul Parul #2
    Forcetalks

    Hi Kapil,

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

    Junction Object
    A custom object with two master-detail relationships. Using a custom junction object, you can model a “many-to-many” relationship between two objects. For example, you create 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.
    Creating the many-to-many relationship consists of:

    1.Creating the junction object.
    2.Creating the two master-detail relationships.
    3.Customizing the related lists on the page layouts of the two master objects.
    4.Customizing reports to maximize the effectiveness of the many-to-many relationship.

    Thanks

    #35944
    Salesforce | shariq shariq #1
    Forcetalks

    Hi,

    You need to create third object which will be called junction object and relate the other two objects to through master detail or lookup

    Hope this helps.

    #35997
    Salesforce | Parul Parul #2
    Forcetalks

    Salesforce supports 2 kinds of relationships like Master Detail and Lookup. They are both one-to-many relationship, and they are both  defined from the many-to-one side, that is from a child to a parent. They can be made one-to-one relationship by adding validation rules, or maybe triggers to enforce the one-to-one nature, i.e. only one child is allowed.

     

    Junction objects are used to create many to many relationships between objects. If you take the Recruiting application example, you can see that a Position can be linked to many Candidates, and a Candidate can apply for different Positions. To create this data model you need a third object “Job Application” that links the 2.

     

    So you’d create a lookup field for both Position and Candidate object on the “Job Application” object. This will establish many to many relationship between Position and Candidate via the “Job Application” object known as the junction object.

     

    Fore more information, read some article

    #41041
    Salesforce | Aman Aman #4
    Forcetalks

    Hi,

    Creating Many to Many relationship in salesforce is little tricky. You cannot create this type of relationship directly. Follow below steps to create this type of relationship.
    Create both objects which should be interlinked.
    Create one custom object (also called as junction object), which should have auto number as unique identification and create two master relationships for both objects, no need create tab for this object.
    Now on both objects, add this field as related list.

    Thanks

    #41063
    Forcetalks

    Hello,

    You can use Junction Object to create many to many relationships.

    thanks.

Viewing 8 posts - 1 through 8 (of 8 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2019 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?