Activity Forums Salesforce® Discussions Can we create many to many relationship using lookup field in Salesforce Junction Object?

  • Sudhir

    Member
    July 5, 2017 at 9:12 am

    Yes you can.. but there will be difference in terms of what you achieve thru master-detail.

  • shariq

    Member
    July 5, 2017 at 10:23 am

    thanks Sudhir, can u please tell difference.

  • Sudhir

    Member
    July 5, 2017 at 10:43 am

    Differences like in case of lookup:

    1.The child record could exist independently.

    2. No cascade delete.

    3. Independent OWD/Ownership

  • shariq

    Member
    July 5, 2017 at 1:56 pm

    Thanks Sudhir,
    can u explain Independent ownership

  • Radhakrishna

    Member
    July 6, 2017 at 8:11 am

    Hello Shariq,

    When you first learned that every record in Salesforce has a designated owner, you might have been a little surprised. In most database-driven applications and platforms, access to data isn’t tied to any ”’ownership” concept.

    Record ownership is at the core of Salesforce’s record access capabilities, which allow you to specify which users or types of users should be able to access specific records or types of records. Salesforce.com’s architects and developers have spent years creating a highly functional and massively scalable record access infrastructure around record ownership, saving you the monumental effort of building that infrastructure yourself.

  • Parul

    Member
    September 16, 2018 at 5:01 am

    Yes, you can use Lookup Relationship for creating a Many-To-Many relationship, but, it will not support entire feature of Many-To-Many concept. In other words, using Master-Detail Relationship for creating Many-To-Many Relationship gives you an ideal feature of Many-To-Many. Here are the features which you will not get with lookup relationship.

    If these features are not required or adjusted somehow by your custom code, then both options will work. But, Master-Detail solution is always the ideal solution.

     

    Thanks

  • Aman

    Member
    September 29, 2018 at 7:10 pm

    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

  • Avnish Yadav

    Member
    September 29, 2018 at 7:46 pm

    Hello,

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

    thanks.

Log In to reply.

Popular Salesforce Blogs