In Salesforce, a master-detail relationship is a type of relationship between two objects where one object is the "master" and the other is the "detail." This relationship is used to connect objects in a parent-child or one-to-many relationship, and it has several implications for data modeling, security, and functionality.
-
1.
open Home | Salesforce
-
2.
Click gear icon and select setup from dropdown and click Next
-
3.
Click on Object Manager to navigate to objects in Salesforce
-
4.
Click Quick Find and type name of that object in which master-detail field should be created and click Next Note : Master-detail relation data-type will work with only custom object
-
5.
Click object
-
6.
Click Fields & Relationships
-
7.
Click New Custom Field
-
8.
Click Master-detail data type and click Next
-
9.
Click Next
-
10.
Select related object from dropdown and click Next
-
11.
Click Next
-
12.
Enter Field Label and provide a name and click on field name ( it will be taken automatically) and and click Next
-
13.
Click Next
-
14.
Click Next
-
15.
Click Next
-
16.
Click Next
-
17.
Click Save