Skip to main content
Data

What is Master-Detail Relationship in Salesforce?

A Master-Detail Relationship is a tightly coupled parent-child link where the child inherits the parent's sharing and security settings, and deleting the parent cascades to delete all children.

Clientell AI, the AI Salesforce admin, documents how Master-Detail Relationship is used in your org in a read-only scan, and flags anything risky or unused. See org documentation

Try it in Clientell AI

“Document how Master-Detail Relationship is used in my org and list anything that looks risky or unused.”

Clientell reads your org first, drafts every change, and changes nothing until you approve. Platform deployments include rollback. How security works.

Start the 14-day free trial, no card

Term Context

Category

Data

13 terms in this category

Related Terms

4

connected concepts

Glossary

66

total definitions

How does Master-Detail Relationship work in Salesforce?

Master-detail relationships enforce a strong dependency between parent (master) and child (detail) objects. The detail record cannot exist without a master; the relationship field is always required and cannot be blank. The detail record inherits its OWD from the master, meaning you cannot set independent sharing on the detail object. If the master record is deleted, all detail records are automatically deleted (cascade delete). Ownership of detail records is irrelevant; access is controlled entirely through the master.

The key advantage of master-detail relationships is support for roll-up summary fields on the master object, which can calculate COUNT, SUM, MIN, or MAX across detail records, extremely useful for aggregating line items on an order, totaling opportunity amounts on an account, or counting tasks on a project. Each object can participate in up to two master-detail relationships, enabling junction objects for many-to-many modeling. Converting between lookup and master-detail requires that every child record has a populated parent reference. Clientell AI can analyze your data model and identify where converting lookups to master-detail would open up roll-up summaries and simplify your security model.

Getting Started

Try this on your own org

Start the 14-day free trial, no card. Clientell scans read-only first and changes nothing until you approve.

14-day free trial  ·  No credit card required

SOC 2
HIPAA
GDPR
Salesforce Partner