What Are Object Relationships
Object Relationship can be created on both Standard Object and Custom Object.Basically, There are two types of Relationship in Salesforce.
Master-Detail Relationship
Master-Detail Relationship is the Parent child relationship.Master-Detail Relationship can be created only on " Custom Objects ".
We Can Create Only 2 Master-Detail Relationship on an Object.
Master field is Mandatory field.
Object in which Master-Detail Relationship is created that object is Called Child Object.
Object to whose data Master-Detail Relationship is referring that object is Called Master Object or Parent Object.
Whenever we delete the Parent Record the Corresponding Child Record also get deleted.
The deleted child record will not go to Recycle bin.
When you Un-delete the Parent records Corresponding Child Record are also Un-Delete.
How To Create a Master-Detail Relationship
1 - Setup-> Create-> Select Object -> Custom Fields & Relationships -> Click On New ->Choose Master-Detail Relationship and click Next.
2 - For Related To, choose Property.
3 - Click Next.
4 - For Field Name, enter Property and click Next.
5 - Click Next, Next, and Save.
Lookup Relationship
Lookup is One-to-Many Relationship which can be created on both Standard Object and Custom Object.Lookup is not Mandatory.
The Owner of the Child Record has no dependencies on Parent Record.
If you delete the Parent record Corresponding Child Record are not deleted.
We can create 40 lookup fields on an Object.
We can create Self-Lookup on an Object.
How To Create a Lookup Relationship
1 - Setup-> Create-> Select Object -> Custom Fields & Relationships -> Click On New ->Choose Lookup Relationship and click Next.
2 - For Related To, choose Property.
3 - Enter the label and name for the lookup field.
4 - Click Next.
5 - Again Click Next.
6 - Click Save.
Comments
Post a Comment