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.
To create the junction object:
- Click Your Name | Setup | Create | Objects.
- Click New Custom Object.
- In the custom object wizard, consider these tips specifically for junction objects:
- Name the object with a label that indicates its purpose, such asBugCaseAssociation.
- For the Record Name field, it is recommended that you use the auto-number data type.
- Do not launch the custom tab wizard before clicking Save. Junction objects do not need a tab.
Few important points (Interview Questions of salesforce ):
- One Object can have only two Master-Detail relationships.
- If we delete record A (First Master detail relationship is always primary) – then child record c will be deleted.
- If we delete record B then in this case also child record C will be deleted.
- If we delete record c then only C will be deleted , master record will not be deleted.
- If child C has two Master record A and B, Where A is primary relation then Child record C will inherit the look and feel of Parent object A.
Using a custom junction object, you can model a “many-to-many” relationship between two objects.
A many-to-many relationship consists of three objects: Object A and Object B are the two primary objects, and Object J is the junction that enables the many to many.
Object A <--M/D-- Object J --M/D--> Object B
So on Object J you need to create two Master-Detail relationships, one that points to Object A and one that points to Object B.
For More Information:
Object A <--M/D-- Object J --M/D--> Object B
So on Object J you need to create two Master-Detail relationships, one that points to Object A and one that points to Object B.
For More Information:
https://success.salesforce.com/ideaView?id=087300000006tlL
No comments:
Post a Comment