SALESFORCE-CERTIFIED-ADMINISTRATOR practice question 25 of 30

Universal Containers administrator has been asked to create a many-to-many relationship between two existing custom objects. Which two steps should the administrator take when enabling the many-to-many relationship? Choose 2 answers

Full set: 248 questions

Domain Object Manager and Lightning App Builder

Answer options
A: Create a junction with a custom object. Correct answer
B: Create two master detail relationships on the new object. Correct answer
C: Create two lookup relationships on the new object.
D: Create URL fields on a custom object.
Correct Answer:
A. Create a junction with a custom object.; B. Create two master detail relationships on the new object.
Explanation

To implement a many-to-many relationship between two objects in Salesforce, a third custom object, known as a junction object, is necessary. This junction object serves as the bridge connecting the two primary objects. The standard and most effective method is to create two master-detail relationships on this new junction object. Each master-detail field links the junction object to one of the two objects being related, making them the "master" records. This configuration allows a single record from one master object to be associated with multiple records from the other, and vice versa, through the intermediary junction object records.

Why Incorrect

C. While a junction object can be created with two lookup relationships, this creates a loosely-coupled link and lacks the features of a true many-to-many relationship, such as roll-up summary fields and cascading record deletion.
D. URL fields are designed to store web addresses and are not used for creating or defining relationships between Salesforce objects.

References

1. Salesforce Help Documentation: In the "Create a Many-to-Many Relationship" article, it states, "To create a many-to-many relationship, create a custom junction object, and then create two master-detail relationship fields on the junction object. The master-detail relationship fields link the junction object to the two objects you want to relate."

Source: Salesforce Help, "Create a Many-to-Many Relationship".

2. Trailhead, Data Modeling Module: The "Create Object Relationships" unit explains, "To connect two objects in a many-to-many relationship, you need a third object, called a junction object... The junction object has two master-detail relationships, one for each of the objects you're connecting."

Source: Trailhead, Data Modeling, "Create Object Relationships" section.

3. Salesforce Developer Documentation: The "Object Relationships Overview" guide details the implementation: "You can use master-detail relationships to model many-to-many relationships between any two objects... When modeling a many-to-many relationship, you use a third custom object, called a junction object... The junction object has two master-detail relationships, one for each of the objects you're connecting."

Source: Salesforce Developer Documentation, "Object Relationships Overview".

Scroll to Top