A junction object is a Salesforce object that contains many-to-many relationships between two related objects.
What is a Junction Object in Salesforce?
If you want to create the many-to-many relation then we need to use the Junction object in Salesforce. A junction Object is a type of custom object which allows linking two custom objects.
A junction Object in simple terms can be called a custom object with two master details fields
Junction Object Examples
For example, Let us assume that we have two Objects – Contact and Room. To provide the many-to-many relationship between the Contact and the Room, we will need to create one more object let’s say it would be Reservation, it will be called a junction object.

Relationship Types in Salesforce
Let’s see how many types of relationship type in Salesforce.
- Master-Detail Relationship: One Object is considered as the Master and the other as the Detail. If you delete the record of the Master Object, the information of the Detail Object will get deleted automatically.
- Look-Up Relationship: The Objects in a Look-Up Relationship are connected loosely. It means that if you delete the record of an Object, it will not impact the linked Object.
- Many-to-Many Relationship: Records of a particular object can connect with various records of different objects and vice versa.
- Self Relationship: It means an Object is creating a relationship with itself.
- External Relationship: This field is used to connect the external Object with another external object.
Steps to create a Junction Object in Salesforce
Check the below session from min 46:00 to learn about junction objects.
Junction Object Interview Question
Try below and find the answer to the Junction Object Interview Question. Don’t forget to share the answers in comment
- As a user, you will able to see junction records in Salesforce when you don’t have read access on one parent record.
- What happened to the junction record when someone deleted the one-parent record?
1. As a user, you will able to see junction records in Salesforce when you donโt have read access on one parent record.
ANSWER : The primary object permission will be apply to junction object, So the junction object permission is read only.
2. What happened to the junction record when someone deleted the one-parent record?
ANSWER: If we delete any one of the master records the corresponding child records will get deleted too.
If the record has two master records in a many-to-many relationship, the user must have read access to both master records.” to view junction object’s record.
What about is the user doesn’t have access to one of the parent records? He will be able to see the record?
Hi want to learn master detail relationships and how its applied or used in salesforce . could anybody pls give me some links to podcasts which are very explanatory.
Then the User won’t be able to View the Junction Object
Nice
1. As a user, you will able to see junction records in Salesforce when you donโt have read access on one parent record.
ans:=wonโt be able to View the Junction Object.
2.What happened to the junction record when someone deleted the one-parent record?
the junction object remains in the system.because 2nd parent will act as primary parent.