0

I'm preparing to SF Dev1 exam and noted that they suggest using MD instead of Lookup. What can be the reasons using this approach?

4

You can use lookups to create the many to many relationship, but using this approach results in orphaned junction object records when parent records are deleted. With MD the junction records are deleted automatically when one or both parent records are deleted.

A lookup approach is used in situations when you want to specifically assign ownership to the junction record. This isn't possible when the junction object is the child of MD relationships as the detail record of a MD relationship is owned automatically by the parent record.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.