If you are preparing for the Salesforce Administrator Certification or working as a Salesforce Admin, understanding the lookup relationship is non-negotiable. It is one of the most frequently tested topics on the Salesforce Admin exam and one of the most commonly used features in real Salesforce implementations.
In this guide, we cover everything: what a lookup relationship is, how it differs from a master-detail relationship, the different types, when to use each, how to create one step-by-step, and answers to the most frequently asked questions.
Table of Contents
ToggleWhat Is a Lookup Relationship in Salesforce?
A lookup relationship in Salesforce is a loosely coupled relationship between two objects that allows records from one object to be associated with records from another — without enforcing strict ownership or deletion rules between them.
Think of it like a reference. A child record can point to a parent record, but if the parent is deleted, the child continues to exist independently. The lookup field on the child simply becomes blank (null).
Simple Definition A lookup relationship connects two Salesforce objects in a one-to-many relationship where the child record can exist independently of the parent. Deleting the parent does NOT automatically delete the child records.
Lookup Relationship Example
Consider the standard Contact and Account objects in Salesforce. The Contact object has a lookup relationship to the Account object. A Contact can be associated with an Account — but if that Account is deleted, the Contact record survives. The Account field on the Contact simply becomes empty.
This flexibility is what makes lookup relationships so widely used across standard and custom Salesforce objects.
Key Characteristics of Lookup Relationships
Understanding the core characteristics will help you make the right design decisions when building your Salesforce data model.
- Optional Field: The lookup field on the child object is not required by default. A child record can be saved without selecting a parent. You can enforce a value by making the field required via field settings or validation rules.
- No Cascade Delete: When a parent record is deleted, Salesforce does NOT automatically delete the related child records. The lookup field simply becomes null on those orphaned child records.
- Independent Sharing and Security: Unlike master-detail relationships, child records in a lookup relationship do not inherit the parent’s sharing rules or ownership. Each object manages its own OWD, sharing rules, and record ownership independently.
- No Roll-Up Summary Fields: Roll-up summary fields (SUM, COUNT, MIN, MAX across child records) are only available in master-detail relationships — not in lookup relationships.
- Maximum of 40 Lookups Per Object: A single Salesforce object can have up to 40 lookup relationships combined with other relationship fields.
- Reparenting Allowed: Child records in a lookup relationship can be moved from one parent to another at any time (reparenting), giving users and admins maximum flexibility.
Types of Lookup Relationships in Salesforce
Salesforce offers several variations of the lookup relationship, each designed for a specific scenario. Knowing when to use each type is critical for the Admin exam and real-world implementation.
3.1 Standard Lookup Relationship
The most common type. It connects a child object (custom or standard) to a parent object in a one-to-many fashion. For example, linking a custom Support Ticket object to the Account object so each ticket is associated with a specific account.
3.2 Self Relationship
A self relationship is a lookup relationship where an object has a lookup field pointing to itself. This is useful for modeling hierarchical or recursive data within the same object.
Example: The Campaign object uses a self-relationship to support Campaign Hierarchies. A child campaign (a regional event) can be linked to a parent campaign (a global marketing initiative). Similarly, an Employee object can use a self-relationship where each employee has a lookup to their manager — who is also an Employee record.
3.3 Hierarchical Relationship
The hierarchical relationship is a special lookup relationship available only on the User object. It lets you create a chain of users in a hierarchy — for example, linking a user to their direct manager.
This relationship powers features like role hierarchies in Salesforce’s sharing model. A manager higher in the hierarchy can automatically access records owned by their subordinates.
3.4 External Lookup Relationship
An external lookup relationship links a Salesforce child object to an external parent object — data that lives outside Salesforce (such as in an ERP or external database). The relationship is matched using the external object’s External ID field.
This is part of Salesforce Connect, which lets you view and interact with data from external systems directly inside Salesforce without importing it.
3.5 Indirect Lookup Relationship
An indirect lookup relationship works in reverse: it links an external child object to a standard or custom Salesforce parent object. The match is made via a custom unique external ID field on the Salesforce object, rather than the standard Salesforce record ID.
Lookup Relationship vs Master-Detail Relationship
The lookup relationship vs master-detail relationship comparison is one of the most tested topics on the Salesforce Admin certification exam. Here is a detailed side-by-side breakdown:
| Feature | Lookup Relationship | Master-Detail Relationship |
|---|---|---|
| Coupling | Loosely coupled | Strongly coupled |
| Delete Behavior | Parent delete does NOT delete child | Parent delete DOES delete child (cascade) |
| Child Required | Parent field is optional | Parent field is required |
| Ownership | Child owns its own record | Child inherits parent’s owner |
| Sharing Rules | Independent sharing settings | Child inherits parent’s sharing |
| Roll-Up Summary | Not available | Available (SUM, COUNT, MIN, MAX) |
| Max Per Object | Up to 40 lookup relationships | Max 2 master-detail relationships |
| Standard Objects | Can be on child side | Cannot be on child (detail) side |
| Reparenting | Allowed by default | Requires explicit permission |
Â
When to Choose a Lookup Relationship
- Records on both sides need to exist independently
- You do not need roll-up summary fields from child to parent
- You want child records to have independent ownership and sharing
- The relationship is optional — not every child record needs a parent
When to Choose a Master-Detail Relationship
- Child records only make sense in the context of the parent (e.g., Order Line Items under an Order)
- You need roll-up summary fields on the parent
- You want to automatically delete all child records if the parent is deleted
- You need the child to inherit the parent’s sharing and security settings
Many-to-Many Relationships and Junction Objects
Sometimes two objects need a many-to-many relationship — where a record from Object A can relate to multiple records from Object B, and vice versa. Salesforce handles this through a junction object.
What Is a Junction Object?
A custom object that sits between two other objects, with a relationship field pointing to each. Each record in the junction object represents one connection between the two parent objects.
Example: Say you have an Instructor object and a Course object. Each instructor can teach many courses, and each course can have many instructors. You create a junction object called InstructorCourse with a lookup (or master-detail) relationship to Instructor and another to Course.
Primary vs Secondary Relationship in Junction Objects
When using master-detail relationships in a junction object:
- Primary Relationship — The first master-detail relationship created. It determines the junction object’s icon, color, and record ownership. Deleting a primary parent record deletes all associated junction records.
- Secondary Relationship — The second master-detail relationship. It also cascade-deletes junction records when the secondary parent is deleted.
Note: A single object can have a maximum of two master-detail relationships. A junction object cannot serve as the master object in another master-detail relationship.
How to Create a Lookup Relationship in Salesforce
Creating a lookup relationship is a core admin task. Here is the complete step-by-step process:
- Log in to Salesforce and click the Gear icon → Setup
- In the Quick Find box, type Object Manager and open it
- Select the child object (the object that will hold the lookup field)
- Click Fields & Relationships in the left sidebar
- Click the New button
- Select Lookup Relationship as the field type and click Next
- In the Related To dropdown, choose the parent object you want to link to and click Next
- Enter the Field Label and Field Name for the lookup field
- Configure field-level security — choose which profiles can see/edit this field
- Add the field to relevant page layouts
- Optionally, customize the related list that will appear on the parent record’s page
- Click Save
Once saved, the new lookup field appears on the child object’s record page. When users open a parent record, they see a related list showing all associated child records.
Real-World Use Cases for Lookup Relationships
Here are practical examples of lookup relationships being used in real Salesforce implementations:
Sales Performance Tracking: Link the Opportunity object to a custom Sales Territory object via a lookup. Sales managers can view all opportunities within a territory — and if a territory record is deleted, the opportunities remain intact.
Customer Support: Relate a Case object to a Product object using a lookup. Support agents can link cases to specific products for better issue tracking and analysis — even if a product is later discontinued.
HR and Employee Management: An Employee object can use a self-relationship (lookup to itself) to link each employee to their manager, creating a reporting hierarchy without cascade-delete behavior.
Cross-Object Reporting: Linking a custom Training Record object to both the Contact and Course objects via lookups allows HR teams to build cross-object reports on employee training completion.
Marketing Attribution: Linking campaign responses to campaigns via lookup relationships (rather than master-detail) ensures response records are not deleted if a campaign is removed.
Lookup Relationship Best Practices
Choose the right relationship type first. Before creating a lookup, ask: should child records survive if the parent is deleted? If yes → lookup. If no → master-detail.
Keep the number of lookups manageable. While you can have up to 40 lookups per object, a data model with dozens of lookup fields becomes hard to maintain. Aim for purposeful, clean relationships.
Use lookup filters to improve data quality. Salesforce allows you to add lookup filters that restrict which records a user can select in a lookup field, reducing data entry errors.
Consider converting to master-detail when you need roll-up summaries. You can convert a lookup to master-detail — but only if all child records already have a parent value (no orphaned records).
Visualize your data model using Schema Builder. Go to Setup → Schema Builder to see all your object relationships in a visual diagram. This helps teams avoid creating redundant or conflicting relationships.
Plan for orphaned records. Since lookup relationships do not cascade-delete, define a process (using Flows or Apex triggers) to automatically handle child records that lose their parent reference.
Frequently Asked Questions (FAQs)
Q1: Can a lookup relationship field be required?
Yes. By default, lookup fields are optional — but you can make them required at the field level or via validation rules. Making it required changes the behavior significantly, bringing it closer to a master-detail relationship in practice.
Q2: What happens to child records when a parent is deleted in a lookup relationship?
Nothing happens automatically. The child record survives and the lookup field becomes blank (null). This is one of the most important differences between lookup and master-detail relationships.
Q3: How many lookup relationships can an object have?
A single Salesforce object can have up to 40 lookup relationships. This includes all custom lookups, self-relationships, and hierarchical lookups combined.
Q4: Can I convert a lookup relationship to a master-detail relationship?
Yes — but only if every child record already has a value in the lookup field (no orphaned records exist). You can change the field type in Object Manager. Once converted, you gain access to roll-up summary fields.
Q5: What is the difference between an external lookup and a standard lookup?
A standard lookup connects two internal Salesforce objects. An external lookup relationship connects a Salesforce object to an external object (data outside Salesforce) using an external ID as the matching key.
Q6: Does a lookup relationship affect record sharing or security?
Unlike master-detail relationships, lookup relationships do not pass sharing rules or OWD settings from parent to child. Each object maintains its own sharing configuration independently.
Q7: Is lookup relationship a common Salesforce Admin exam topic?
Absolutely. Lookup relationships, master-detail relationships, and the differences between them are core topics on the Salesforce Administrator Certification exam. Expect scenario-based questions testing when to use each type.
Summary
The lookup relationship is one of the most foundational concepts in Salesforce data modeling. Here is a quick recap:
- A lookup relationship is a loosely coupled, optional association between two Salesforce objects
- Unlike master-detail, it does NOT cascade-delete child records when the parent is deleted
- Child records maintain their own ownership and sharing settings
- Roll-up summary fields are not available in lookup relationships
- Types include: Standard, Self-Relationship, Hierarchical (User only), External Lookup, and Indirect Lookup
- Junction objects use two relationships to model many-to-many relationships
- You can have up to 40 lookup relationships per object
- Converting a lookup to master-detail is possible if all child records have a parent value
Understanding when to use a lookup relationship versus a master-detail relationship — and knowing the implications of each choice — is a skill that separates good Salesforce Admins from great ones.
Ready to Master Salesforce Admin?
Lookup relationships are just the beginning! The Salesforce Admin certification exam covers dozens of topics just like this — from data modeling and automation to security, reports, and dashboards.
Our Salesforce Admin Certification Course is designed to take you from beginner to exam-ready with:
- Exam-aligned curriculum covering every Admin exam topic
- Hands-on practice exercises with real Salesforce scenarios
- Step-by-step video lessons you can learn at your own pace
- Real-world project scenarios to build practical skills
- Lifetime access so you can revisit topics anytime




