Related Object
A Related Object in Salesforce is any object connected to another object through a Lookup or Master-Detail relationship, where the connection is represented by a relationship field on one side and a related list on the other.
Definition
A Related Object in Salesforce is any object connected to another object through a Lookup or Master-Detail relationship, where the connection is represented by a relationship field on one side and a related list on the other. Contact is a related object to Account because every Contact carries an AccountId lookup; Opportunity is a related object to Account in the same way; OpportunityLineItem is a related object to Opportunity through a Master-Detail relationship.
Related Object is the conceptual term for the connected-record pattern that runs through the entire Salesforce data model. Every standard CRM workflow (a Lead converting into an Account, a Case linked to a Contact, an Opportunity linked to its product line items) is built on related objects. The related object pattern is what enables roll-up summary fields, related-list rendering on detail pages, parent-child sharing inheritance, and the cross-object reporting that defines Salesforce analytics.
How related objects shape the data model, the UI, and every cross-object report
Lookup vs Master-Detail
Salesforce has two relationship field types that create related objects. Lookup is loose: the child can exist without a parent, sharing is independent, and deleting the parent does not delete the child. Master-Detail is tight: the child cannot exist without a parent, the child inherits ownership and sharing from the parent, and deleting the parent cascade-deletes the child. The choice between the two drives the entire downstream behavior; lookups are for soft references (Case to Knowledge Article), master-detail for strict ownership (Opportunity to OpportunityLineItem).
Related lists on detail pages
When a child object's relationship field points to a parent, the parent's detail page automatically renders a Related List for the child. The list shows the child records, supports inline create and edit, and respects the user's permissions on the child object. Layouts let admins choose which related lists appear, the column set, and the row count. Most of the UI affordances users associate with the Salesforce detail page (the Opportunities related list on Account, the Cases related list on Contact) are direct consequences of the related-object pattern.
Roll-up summary fields
On a Master-Detail relationship, the parent object can carry Roll-Up Summary fields that aggregate child records: SUM, MIN, MAX, COUNT. Account, for example, can carry a roll-up summary of Opportunity Amount filtered to Closed Won, giving a Total Closed Revenue field on Account with no Apex required. Roll-up summaries cannot exist on Lookup relationships; the platform only guarantees the aggregation can be maintained when the child cannot become orphaned. For lookup-style aggregations, the workaround is a scheduled flow or Apex trigger.
Reports across related objects
Salesforce reports support up to four levels of related objects in one report type. The standard Opportunities with Products and Activities report joins Opportunity, OpportunityLineItem (via master-detail), and Activity (via task lookup) into one cross-object query. Custom report types let admins build their own combinations: Accounts with Contacts with Cases, Campaigns with Campaign Members with Leads, etc. The platform's reporting engine generates the underlying SOQL with parent-child joins and renders the cross-object result without forcing the analyst to write code.
Sharing inheritance on Master-Detail
Master-Detail children inherit sharing from their parent. If a user can see the parent Account, they automatically can see every child Opportunity, Case, and Contact tied to that Account. Lookup children, by contrast, have their own sharing model and can be visible or invisible independently. This distinction matters for confidential records: a Contract linked to an Account through a lookup can be hidden from users who can see the parent, while a Contract linked through master-detail cannot.
Many-to-many through junction objects
Salesforce does not support native many-to-many relationships; the standard pattern is a junction object with two Master-Detail relationships, one to each parent. CampaignMember is the canonical example: it sits between Campaign and Contact (or Lead), with one master-detail to each. The junction object becomes a related object to both parents, and reports can pivot through it to show campaigns per contact or contacts per campaign. The two-master rule lets the junction inherit sharing from whichever parent is marked Primary.
External and self-referencing relationships
Two specialized variations are worth knowing. External Lookup connects to an External Object backed by a real-time data source (Salesforce Connect, OData), letting external systems appear as related objects without storing the data locally. Self-referencing lookups (Account.ParentAccount, User.ManagerId, Case.Parent) let an object relate to records of its own type, enabling hierarchical views like account hierarchies and case escalation chains. Both follow the standard related-list rendering and roll-up rules, with edge cases on circular references that admins need to design around.
Create a Lookup relationship between two custom objects
Add a Lookup field on a child custom object pointing to a parent, then verify the parent's detail page shows the new related list and reporting picks up the join.
- Open the child object
Setup, Object Manager, find the child object (the one that will hold the relationship field). Click Fields and Relationships, New.
- Choose Lookup Relationship
On the field type selector, pick Lookup Relationship. Click Next. If you need strict ownership and roll-ups, choose Master-Detail Relationship instead.
- Pick the related object
Select the parent object from the dropdown. Standard objects (Account, Contact, Opportunity) appear alongside custom ones. Click Next.
- Set field label and name
Enter the field label as it will appear on the child layout. The API name defaults from the label; adjust if needed. Add a help text describing the relationship.
- Configure related list
Choose the columns to show on the parent's related list and the row count (typically 5 or 10). Save.
- Verify on the parent page
Open any parent record. The new related list appears on its detail page. Add a child record to confirm the relationship is wired correctly.
- Each object supports at most 2 master-detail relationships and 40 total relationships of all types. Plan the data model upfront; refactoring after hitting the limit is painful.
- Switching a Master-Detail to a Lookup decouples sharing inheritance and removes any roll-up summary fields that depended on it. The conversion is one-way without data loss but is not safely reversible.
- Roll-up summary fields are limited to 25 per object. Heavy use can hit the cap; consolidate by combining filters or moving aggregations to scheduled flows.
- Deleting a master record cascade-deletes every detail record. There is no undelete-with-children flow; recovery requires a full sandbox restore.
Trust & references
Cross-checked against the following references.
- Relationships Among ObjectsSalesforce Help
- Relationship ConsiderationsSalesforce Help
- Roll-Up Summary FieldsSalesforce Help
Straight from the source - Salesforce's reference material on Related Object.
- Object RelationshipsSalesforce Help
- Relationships in the Object ReferenceSalesforce Developer Docs
- Custom Object OverviewSalesforce Help
Hands-on resources to go deeper on Related Object.
About the Author
Dipojjal Chakrabarti is a B2C Solution Architect with 29 Salesforce certifications and over 13 years in the Salesforce ecosystem. He runs salesforcedictionary.com to help admins, developers, architects, and cert/interview candidates sharpen their fundamentals. More about Dipojjal.
Test your knowledge
Q1. What is a Related Object?
Q2. How are objects related?
Q3. Why does relationship design matter?
Discussion
Loading discussion…