Question

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

An administrator is designing a custom data structure to track consulting engagements and specialized team skill certifications. Each consulting engagement can require multiple skill certifications, and each skill certification can be associated with multiple consulting engagements. If a skill certification is deleted, the association to the engagement must be removed automatically without deleting the engagement itself. Additionally, managers need to calculate aggregate metrics on the engagement record, such as the total certification level count. Which two design choices should the administrator implement to meet these business requirements?

  1. Create a custom junction object that links Consulting Engagement and Skill Certification using two Master-Detail relationships.Answer
  2. Define Consulting Engagement as a Master object in a Master-Detail relationship on the junction object to enable roll-up summary fields.Answer
  3. C
    Use Lookup relationships between the junction object and both parent objects so that deleting a Skill Certification leaves the junction records intact for historical auditing.
  4. D
    Create a direct Lookup relationship from Consulting Engagement to Skill Certification and add a roll-up summary field directly on the Consulting Engagement object.

Answer

The administrator must create a custom junction object with two Master-Detail relationships to establish a many-to-many model, and define Consulting Engagement as a Master object on that junction object to enable roll-up summary calculations.
To model a many-to-many relationship between Consulting Engagement and Skill Certification, a custom junction object with Master-Detail relationships to both objects must be created. Building a Master-Detail relationship where Consulting Engagement is the Master permits the creation of native Roll-Up Summary fields on Consulting Engagement to aggregate child records, while ensuring junction records are deleted if a Skill Certification is removed.

Step-by-Step Solution

1
Analyze relationship cardinality requirements
Since one engagement can have multiple certifications and one certification can apply to multiple engagements, a Many-to-Many relationship model using a junction object is required.
Direct single lookup fields cannot model many-to-many business relationships in Salesforce.
2
Determine relationship types for deletion cascade and roll-up capabilities
Master-Detail relationships must be used from the junction object to both parent objects.
Master-Detail relationships enforce cascading deletion of junction records when a parent record is deleted and enable Roll-Up Summary fields on the Master object.
3
Verify roll-up summary requirement on the parent object
Consulting Engagement acts as the Master object, allowing Roll-Up Summary fields to summarize child junction records.
Salesforce only allows Roll-Up Summary fields on the Master side of a Master-Detail relationship.

Key Concept

Many-to-Many Relationships and Roll-Up Summary Requirements
Estimated Time:2m 0s
Rate this question