54.3k views
2 votes
Can you create a Master-Detail relationship on existing records in Salesforce?

A. Yes
B. No

User Dankirkd
by
8.0k points

1 Answer

4 votes

Final answer:

No, you cannot create a Master-Detail relationship on existing records in Salesforce if any of the child records are missing a master record. Existing relationships must be established before converting to a Master-Detail relationship, which enforces referential integrity.

Step-by-step explanation:

Can you create a Master-Detail relationship on existing records in Salesforce? The answer is B. No, and they are not mutually exclusive either. When you create a Master-Detail relationship in Salesforce, the detail (or child) records must be related to a master (or parent) record. If you want to convert a lookup relationship to a Master-Detail relationship, you must ensure that all existing records have a value in the lookup field, as Master-Detail relationships require that each child record is associated with a parent record.

In scenarios where existing detail records do not have associated master records, you will first have to establish those relationships before converting to a Master-Detail relationship. Moreover, the Master-Detail relationship enforces referential integrity, which means that if a master record is deleted, all related detail records will also be deleted automatically.

User Jevgenij Nekrasov
by
8.9k points