When working with Salesforce, one of the most powerful ways to connect data across objects is through relationships. Just like in the real world, where people or things are connected to one another, Salesforce allows records in one object to be linked with records in another object.
One of the most commonly used relationships is the Lookup Relationship.
What is a Lookup Relationship?
A Lookup Relationship is a type of relationship in Salesforce that links one object to another object (or itself).
It allows you to “look up” a related record and establish a connection between them. However, unlike Master-Detail Relationship, lookup relationships are loosely coupled.
👉 Think of it like this:
- Lookup Relationship = A reference or optional link between records.
- Master-Detail Relationship = A strong dependency between records.
Key Features of Lookup Relationships
- Optional Relationship – A record in one object can exist without a related record in the other object.
- No Cascade Delete (by default) – Deleting the parent record does not automatically delete child records.
- Flexibility – Can be used to link standard-to-standard, standard-to-custom, or custom-to-custom objects.
- Up to 40 Lookup Fields – You can create up to 40 lookup fields per object.
- Self-Relationship – An object can have a lookup relationship with itself (e.g., Employee Manager hierarchy).
Real-Life Example
Imagine you are managing a Student Management System in Salesforce.
- You have a Student object.
- You also have a Course object.
Using a Lookup Relationship, you can link each Student to the Course they are enrolled in.
But the student can exist in the system even without being enrolled in any course (that’s why the relationship is not mandatory).
How Lookup Relationship Works
Here’s a simple visualization:
[ Student Object ] <---- Lookup ----> [ Course Object ]
(Child) (Parent)
In Salesforce UI, the Student record will have a lookup field that lets you select a Course.
Visual Diagram (Easy to Understand)

👉 The Course (Lookup field) in the Student object points to a record in the Course object.
Lookup vs. Master-Detail at a Glance
| Feature | Lookup Relationship | Master-Detail Relationship |
| Dependency | Loose | Strong |
| Record Ownership | Independent | Controlled by Parent |
| Delete Behavior | Child survives | Child deleted with Parent |
| Roll-up Summary Fields | Not Supported | Supported |
| Mandatory Relationship | Optional | Mandatory |
Special Types of Lookup Relationships
- Self-Lookup
- An object can look up to itself.
- Example: An Employee record having a lookup field for their Manager (who is also an Employee).
- An object can look up to itself.
- Hierarchical Lookup
- Specially available only for the User object.
- Allows one User to be linked hierarchically to another User (e.g., manager-subordinate relationship).
- Specially available only for the User object.
Step-by-Step: How to Create a Lookup Relationship
- Go to Setup → Object Manager → Select your Object (e.g., Student).
- Click Fields & Relationships → New.
- Choose Lookup Relationship.
- Select the related object (e.g., Course).
- Set field-level security and layout.
- Save and test by creating records.
When to Use Lookup Relationships?
Use a Lookup Relationship when:
- The child record should exist independently of the parent.
- You don’t want cascade delete behavior.
- You don’t need roll-up summary fields.
- The relationship is more about referencing rather than dependency.
Cheat Sheet: Lookup Relationship Quick Notes
- Can be optional.
- Can link objects flexibly.
- No roll-up summary fields.
- No cascade delete (unless enabled).
- Supports up to 40 lookups per object.
- Useful for real-world reference-like relationships.
Conclusion
Lookup Relationships in Salesforce provide flexibility and independence between records. They are ideal when you need to reference another object but don’t want strong dependency.
Whether you’re linking Students to Courses, Employees to Managers, or Accounts to Contacts, lookup relationships make your Salesforce data model more powerful and interconnected.
