O'Reilly logo

Force Platform Fundamentals: An Introduction to Custom Application Development in the Cloud by Andrea Leszek, Adam Gross, Nick Tran, Dave Carroll, Caroline Roth, Chris McGuire

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a Many-to-Many Relationship

Our Recruiting app now has quite a few many-to-one relationships, but what if we needed to create a many-to-many relationship? For example, what if we have an object that stored information about various employment websites, and we wanted to track which open positions we posted to those sites? This would require a many-to-many relationship because:

  • One position could be posted on many employment websites.

  • One employment website could list many positions.

Here’s where we get a little creative. Instead of creating a relationship field on the Position object that directly links to the Employment Website object, we can link them using a junction object. A junction object is a custom object with two master-detail ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required