Master/Detail Relationship in Custom Objects: Key Points, Examples, and Best Practices

Master/Detail Relationship in Custom Objects

Prev Question Next Question

Question

Which of the following are true about Master/Detail relationship in custom objects?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

AD.

A master-detail relationship is a type of relationship that can be defined between two custom objects in Salesforce. Here's a detailed explanation of each answer option:

A. Sharing is inherited from parent: When you create a master-detail relationship between two custom objects, the child object's sharing settings are automatically inherited from the parent object. This means that the child object's record-level access is determined by the parent object's sharing settings. For example, if the parent object is set to private, the child object's records will also be private.

B. Child needs to be manually deleted when parent is deleted: When a master record is deleted, all its related detail records are automatically deleted as well. This is the default behavior of Salesforce and it ensures that there are no orphaned child records in the system. So, the answer is false.

C. Only child fields are available for reporting: When you create a master-detail relationship between two custom objects, you can report on both the parent and child object fields. However, you can only group and summarize data on child object fields, not on parent object fields. So, this answer is partly true.

D. Lookup field child is required: Unlike lookup relationships, in a master-detail relationship, the child object is always required and must have a value. This is because the child object's record is dependent on the existence of the parent object's record. So, this answer is false.

In summary, the correct answers are:

  • A. Sharing is inherited from parent
  • C. Only child fields are available for reporting