Question

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

An administrator needs to track employee certifications in Salesforce. An employee can hold multiple certifications, and a single certification can be held by multiple employees. Additionally, management requires a roll-up summary field on the Employee object to count the total number of certifications earned by each employee. Which configuration should the administrator implement to meet these requirements?

  1. Create a custom junction object with Master-Detail relationships to both the Employee and Certification objects.Answer
  2. B
    Create a custom junction object with a Lookup relationship to Employee and a Master-Detail relationship to Certification.
  3. C
    Create a direct Lookup relationship field on the Employee object referencing the Certification object.
  4. D
    Create a custom junction object with Lookup relationships to both objects and enable cascade delete on both lookup fields.

Answer

Create a custom junction object with Master-Detail relationships to both the Employee and Certification objects.
To model a many-to-many relationship in Salesforce, a custom junction object must be created with relationship fields linking to both parent objects. Furthermore, because management requires a roll-up summary field on the parent object, the relationship from the junction object to the parent object must be a Master-Detail relationship, as roll-up summary fields are only supported over Master-Detail relationships.

Step-by-Step Solution

1
Determine the data modeling structure required to support a many-to-many relationship between Employee and Certification.
A custom junction object is required to connect both standard/custom objects.
In Salesforce, many-to-many relationships are established by creating a junction object that links two parent objects.
2
Evaluate the field type requirement for roll-up summary capabilities on the parent objects.
The relationship fields on the junction object pointing to both parent objects must be Master-Detail relationships.
Roll-up summary fields can only be created on the master object in a Master-Detail relationship, not over Lookup relationships.

Key Concept

Many-to-Many Relationships and Roll-Up Summary Field Requirements
Estimated Time:1m 30s
Rate this question