Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
DictionaryLLookup Relationship
Core CRMBeginner

Lookup Relationship

A Lookup Relationship in Salesforce is the many-to-one relationship that lets one record reference another without taking ownership of it.

§ 01

Definition

A Lookup Relationship in Salesforce is the many-to-one relationship that lets one record reference another without taking ownership of it. A Contact has a Lookup Relationship to Account; an Opportunity has a Lookup Relationship to Account; an Activity has a Lookup Relationship through WhoId and WhatId. Each lookup field stores the Id of the target record, and the parent record can have any number of children pointing to it through the lookup. Lookup Relationships are the most common relationship type in any Salesforce data model: most standard relationships are lookups, and most Custom Objects need lookups to standard objects to function.

Lookup Relationships are the relational-database analog of a foreign key with no cascade delete by default. The child record carries the parent's Id; deleting the parent leaves the child's lookup field blank (the default cascade behavior is to clear the field, not to delete the child). This makes Lookup Relationships safe for optional or many-to-one connections where the child can survive without the parent. The trade-off is that lookups do not propagate sharing or ownership the way Master-Detail Relationships do; if the child needs to inherit the parent's sharing, lookups are the wrong tool.

§ 02

How Lookup Relationships connect Salesforce records

Optional vs Required

Lookup Relationships default to optional; a Contact can exist without an Account, an Opportunity could in theory exist without an Account (and Salesforce will allow that). Most orgs make Account on Contact required through a validation rule or through the field's Required flag on Page Layout. The platform-level Required setting on the field definition is a stronger enforcement: it prevents save unless the lookup is populated, no matter which UI or API path creates the record. Use the platform-level Required when the relationship is genuinely mandatory and use validation rules for conditional requirements (e.g., Account required when Status = Active).

Cascade behavior on parent delete

When the parent record gets deleted, the child's lookup field behavior is configurable. The default is to clear the lookup (the child survives, lookup goes blank). The alternative is to prevent the parent from being deleted if any child records reference it (preventing orphans). A third behavior, cascade delete the child, is available on specific lookups but not the default. Pick the behavior at relationship-create time based on the data semantics: if losing the parent should also drop the child, configure cascade delete; if the child needs to survive, leave the default; if the parent should never be deleted while children exist, enable the restrict-delete behavior.

Lookup Filters

A Lookup Filter restricts which records the user can pick when populating a lookup field. The filter is a formula evaluated against the candidate records; only those that match the filter appear in the picker. A common pattern is filtering Contact lookups on Opportunity to show only Contacts on the same Account: AccountId = Opportunity.AccountId. Lookup Filters are configured per field through Setup > Object Manager > [object] > Fields & Relationships > select lookup field > Lookup Filter. They reduce data-entry errors at the cost of slightly slower lookup pickers because the filter evaluates against the candidate set.

Hierarchical Lookups

Some objects support self-relationship lookups (a record points to another record of the same object). Account has a ParentId for Account Hierarchy; User has a ManagerId for the user-management tree; Contact has a ReportsToId for org-chart modeling within an Account. These are technically Lookup Relationships pointing back to the same object, and they enable hierarchy-aware reports and rollup calculations. Salesforce caps hierarchical lookup depth at 500 levels in theory but most practical hierarchies stay under ten.

Lookup vs Master-Detail decision

The standard decision tree for picking between the two: if the child cannot exist without the parent, use Master-Detail; if the child can exist independently, use Lookup. Master-Detail propagates sharing and ownership from the parent; Lookup leaves the child with its own sharing model. Master-Detail allows roll-up summary fields on the parent; Lookup does not. Master-Detail counts toward the 2-per-object cap; Lookup counts toward the 40-per-object cap. Most relationships are lookups; master-detail is for genuinely strong parent-child semantics like Order to Order Item or Quote to Quote Line.

Indexed lookups and SOQL performance

Salesforce indexes every Lookup Relationship by default. SOQL queries that filter on a lookup field (e.g., SELECT ... FROM Contact WHERE AccountId = '001...') hit the index and run fast. Without the index, the same query on a non-relationship field would scan every Contact record. The free index is one reason to model relationships as lookups even when the data shape could be flattened: report performance benefits significantly. Custom indexes on non-relationship fields require Salesforce Support tickets and selectivity reviews; lookups index automatically.

Cross-object formulas through lookups

Lookup Relationships enable cross-object formula references. From the child object, you can reference parent fields through the lookup using dot notation (Opportunity.Account.Industry). The formula evaluates at read time, not at save, so changes to the parent record propagate to the child's formula values immediately. This is the standard pattern for surfacing parent data on child page layouts without copying it; the formula stays current as the parent changes.

§ 03

How to create a Lookup Relationship

Creating a Lookup Relationship is one of the most-done admin tasks in any Salesforce org. The configuration is simple but the design decisions about cascade behavior and filtering matter for the life of the relationship.

  1. Open Setup and navigate to the child object

    Setup > Object Manager > select the child object > Fields & Relationships > New.

  2. Pick Lookup Relationship as the field type

    The wizard differentiates Lookup Relationship from Master-Detail Relationship up front; pick Lookup when the child can exist independently.

  3. Pick the related-to object

    The dropdown lists every standard and custom object the lookup can target. Pick the parent.

  4. Set the Field Label, Field Name, and child relationship name

    The Label is what users see; the Field Name is the API name; the Child Relationship Name is what reverse-traversal queries use (Account.Opportunities__r style).

  5. Configure required and unique flags

    Decide whether the lookup is platform-required (cannot be null) and whether it must be unique (each parent can have only one child of this type). Most lookups are neither.

  6. Add Lookup Filter if needed

    Restrict which parent records are pickable through a formula. Useful for "show only active Accounts" or "show only Contacts on the current Account."

  7. Configure cascade delete behavior

    Decide what happens when the parent gets deleted. Clear the lookup (default), prevent the delete, or cascade-delete the child.

  8. Add the field to Page Layouts and configure FLS

    A new field is invisible without Page Layout placement and FLS grants on the relevant Profiles or Permission Sets.

  9. Save and test

    Confirm the lookup works in the UI and that any planned automation (triggers, Flows, formulas) reads the field correctly.

Gotchas
  • Lookup Relationships default to optional. Make them required through the field definition or a validation rule when the data demands it.
  • Default cascade behavior is to clear the child's lookup on parent delete. Pick the alternative behavior when data semantics require it.
  • Lookup Filters narrow the picker but evaluate at runtime. Heavy filters can slow lookup-search performance noticeably.
  • Lookup Relationships do not propagate sharing or ownership. If the child needs to inherit the parent's sharing, use Master-Detail instead.
§

Trust & references

Sources

Cross-checked against the following references.

Official documentation

Straight from the source - Salesforce's reference material on Lookup Relationship.

Keep learning

Hands-on resources to go deeper on Lookup Relationship.

Was this entry helpful?
Help us write better definitions. Quick reactions or detailed edit suggestions.

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. Which Salesforce Cloud is Lookup Relationship most closely associated with?

Q2. Who would typically configure or interact with Lookup Relationship?

Q3. What happens when Lookup Relationship data is not maintained properly in Salesforce?

§

Discussion

Loading…

Loading discussion…