Cert++
Close

Master-detail versus lookup for parent-child models

Key Takeaway

Use master-detail when the child can't exist without the parent. The master then controls the detail's deletion, ownership, and security. Use a lookup when the child can live on its own, or when a custom child object needs sharing rules, manual sharing, or queues.

Lookup and master-detail are the two main relationship fields for linking a child object to a parent object. A lookup is a loose link where the child can live on its own. A master-detail relationship ties the child (the detail) tightly to the parent (the master). Your choice decides how deletes, sharing, roll-up summaries, and reports behave.

When to use each relationship

A lookup relationship links two objects so you can look up one record from another. Lookups can be one-to-one or one-to-many. Use a lookup when the objects are related only in some cases. Objects in a lookup relationship usually work as stand-alone objects and have their own tabs.

For example, Account to Contact is a lookup. One Account can have many Contacts, but a Contact can also exist with no Account.

Use master-detail when the child can't exist without the parent.

For example, an Offer only makes sense for a Property. If someone deletes a Property, its Offers should be deleted too.

Platform App Builder Study Guide

Checklist progress

0/340Learned

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Platform App Builder studiers.