You are on page 1of 7

Create Object Relationships

What Are Object Relationships?


Object relationships are a special field type that connects two objects
together.

There are two main types of object relationships

Lookup Relationships
Master-Detail Relationships
Lookup Relationships
Lookup relationships are a way to define a «loose» relationship
between one object and another, where there is minimal impact
(without additional configuration) as a result of the relationship.
Lookup relationships can be one-to-one or one-to-many.

Contact A
Home
Account Property
seller

Contact B
Master-Detail Relationships
Master-Detail Relationships create a «tight» relationship.
There are some considerations of using Master-Detail relationships:
Each object can have up to 2 master-detail relationships
Master-Detail field needs to be created on Detail object
If a master record is deleted, the detail records will be deleted too
Detail record permissions, security settings and record owner are
inherited from the master record
Roll-up summary fields can be created on the parent record
Roll-up summary field
Roll-up summary fields can be used to summarize (count, sum, min,
max) related records.
You can create a roll-up summary field to display a value in a master
record based on the values of fields in a detail record
For example, we have master-detail relationship between Account and
Opportunity objects.
We can create a roll-up summary field to count a total won
opportunities on an account
Let’s say the owner of a property wanted to
take their home off the market. DreamHouse
Example wouldn’t want to keep any offers made on that
property. With a master-detail relationship
between Property and Offer, you can delete the
property and all its associated offers from your
system.
Lookup vs Master-Detail relationships
Lookup Master-Detail

Parent required No Yes

Security Implications No Yes

Cascade Deletion No Yes

Roll-up Summaries No Yes

Create on Standard Yes No


Objects

You might also like