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?
- Create a custom junction object with Master-Detail relationships to both the Employee and Certification objects.Answer
- BCreate a custom junction object with a Lookup relationship to Employee and a Master-Detail relationship to Certification.
- CCreate a direct Lookup relationship field on the Employee object referencing the Certification object.
- DCreate 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
Key Concept
Many-to-Many Relationships and Roll-Up Summary Field Requirements
Estimated Time:1m 30s