This type of relationship closely links objects together such that the master record controls certain behaviors of the detail and subdetail record.

Behaviors of master-detail relationships include:

  • Deleting a detail record moves it to the Recycle Bin and leaves the master record intact; deleting a master record also deletes related detail and subdetail records. Undeleting a detail record restores it, and undeleting a master record also undeletes related detail and subdetail records. However, if you delete a detail record and later, separately, delete its master record, you cannot undelete the detail record, as it no longer has a master record to relate to.
  • By default, records can’t be reparented in master-detail relationships. Administrators can, however, allow child records in master-detail relationships on custom objects to be reparented to different parent records by selecting the Allow reparenting option in the master-detail relationship definition.
  • The Owner field on the detail and subdetail records is not available and is automatically set to the owner of the master record. Custom objects on the “detail” side of a master-detail relationship can't have sharing rules, manual sharing, or queues, as these require the Owner field.
  • The security settings for the master record control the detail and subdetail records.
  • The master-detail relationship field (which is the field linking the objects) is required on the page layout of the detail and subdetail records.
  • The master object can be a standard object, such as Account or Opportunity, or a custom object.
  • As a best practice, don't exceed 10,000 child records for a master-detail relationship.

Useful Documentation

history | excerpt history