Study for the Salesforce Platform Developer Exam. Study with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

Practice this question and more.


Which relationship should a developer use to relate the Account to the Warehouse custom object?

  1. One-to-Many

  2. Lookup

  3. Master-Detail

  4. Parent-Child

The correct answer is: Lookup

Using a Lookup relationship to relate the Account to the Warehouse custom object is appropriate in many scenarios, particularly when a more flexible relationship is needed. A Lookup relationship creates a one-to-one or one-to-many relationship between two objects, allowing for an association without the strong dependencies and enforced cascade delete behavior characteristic of a Master-Detail relationship. In this context, if a Warehouse needs to reference an Account, but the relationship does not require the strict control over the lifecycle of the related records, a Lookup is ideal. This means that when the Account record is deleted, the Warehouse records will not be deleted automatically, providing more maintainable and flexible data management. Additionally, if more than one Warehouse can be associated with a single Account, then the Lookup relationship allows this kind of association while still enabling dynamic manipulation of related records. Given that a Warehouse can stand alone and it may not necessitate the detailed control of ownership that a Master-Detail relationship provides, leveraging a Lookup relationship provides the right balance of connection and independence. In summary, a Lookup relationship suits scenarios where an object needs to reference another without strict ownership, which aligns with the requirements of relating an Account to a Warehouse custom object.