Junction objects
In the previous section of this chapter, we learned what a Salesforce object is. We also observed that objects can have relationships with each other, such as lookup or master-detail. Both relationships are crucial, as most of the time, you’ll use them to connect Salesforce objects. Thanks to these relationships, you can effortlessly establish one-to-many relationships where there’s a single parent, but multiple child records can be associated with it. However, there will be instances where these types of relationships might not be sufficient to meet the business requirements you’ll encounter.
If you’ve spent some time working with Salesforce Accounts and Contacts, you may have noticed that it works seamlessly when connecting a Contact to a single Account. On the Contact record, you’ll observe that a specific Contact is linked to one and only one Account. But what about scenarios where this Contact is associated with multiple Accounts...