Question

Difficulty: MediumObject Relationships (Lookup, Master-Detail, Many-to-Many)

A Salesforce Administrator needs to design a data model to establish a many-to-many relationship between a custom object named `Consultant__c` and a custom object named `Client_Project__c`. Additionally, management requires total logged hours to be automatically calculated and displayed directly on the `Client_Project__c` record. Which two configuration steps or behaviors are true for this implementation? (Choose 2 answers)

  1. A custom junction object must be created with two Master-Detail relationship fields pointing to `Consultant__c` and `Client_Project__c`.Answer
  2. Roll-Up Summary fields can be created on `Client_Project__c` to aggregate logged hours from the junction object records.Answer
  3. C
    Roll-Up Summary fields can be created on `Client_Project__c` if the junction object is linked using Lookup relationships instead of Master-Detail relationships.
  4. D
    Deleting a `Consultant__c` record will preserve its associated junction object records and automatically clear the consultant relationship field.

Answer

To implement a many-to-many relationship with summary calculations, an administrator must create a junction object containing two Master-Detail relationship fields. Roll-Up Summary fields can then be defined on the master object to aggregate metrics from the junction object records.
Creating a custom junction object with two Master-Detail fields models the many-to-many relationship. Since `Client_Project__c` serves as a master to the junction object, Roll-Up Summary fields can be created on `Client_Project__c` to aggregate numeric values such as logged hours.

Step-by-Step Solution

1
Identify the data modeling requirement for a many-to-many relationship.
Recognize that a junction object with two Master-Detail relationships to the master objects (`Consultant__c` and `Client_Project__c`) is required.
Salesforce achieves many-to-many functionality by placing a custom junction object between two master objects.
2
Evaluate the requirement for calculating totals on `Client_Project__c`.
Confirm that Roll-Up Summary fields can be built on `Client_Project__c` targeting fields on the junction object.
Master objects in Master-Detail relationships natively support Roll-Up Summary fields to aggregate child detail data.

Key Concept

Many-to-Many Relationships and Roll-Up Summary Capabilities
Rate this question