Try a sample question
This is an original sample question written by itmoshi based on the exam objectives.
A recruiting app has custom objects Candidate and Job Position. A candidate can apply to several positions, and a position receives applications from several candidates (fewer than 200 applications per candidate and per position). Requirements: (1) show the number of applications on both Candidate and Job Position records using roll-up summary fields; (2) when either a candidate or a position is deleted, the related application records must be deleted as well. Which data model is most appropriate?
- AAn Application object with master-detail relationships to both Candidate and Job Position
- BAn Application object with lookup relationships to both Candidate and Job Position
- CA lookup field on Candidate pointing to Job Position to record the application
- DA multi-select picklist on Candidate listing the positions applied for
Show answer and explanation
Answer:A For a many-to-many relationship that needs roll-ups and cascade delete, build a junction object with two master-detail relationships.
Why it is correct
Each Application record represents one Candidate–Job Position pair, which models the many-to-many relationship. Making both relationships master-detail lets you create roll-up summary fields (a COUNT of applications) on both masters, and deleting either master record also deletes its detail Application records (deletion can be restricted when more than 200 related records exist, which the stated volumes rule out). This is the only option that meets both requirements declaratively.
The other options
- ✗ B Custom lookup relationships from the Application object do not support native roll-up summary fields on Candidate or Job Position, and by default deleting a parent just clears the lookup instead of deleting the application. Use lookups when children must survive the parent or need their own ownership and sharing.
- ✗ C A lookup field on Candidate holds a single value, so it cannot represent one candidate applying to several positions. Use it for one-to-many relationships where each record has a single parent.
- ✗ D A multi-select picklist just stores values; it creates no relationship to Job Position records, so there is no roll-up or cascade delete on the position side. Use it for a few fixed labels, such as areas of expertise.
Key takeaway
Many-to-many → junction object. Need roll-up summaries, cascade delete or inherited sharing → master-detail. Independent ownership/sharing or children that outlive the parent → lookup. One-to-many is enough → a single lookup on the child.
Try 48 questions like this for free
itmoshi is an unofficial study service and is not affiliated with Salesforce or any exam provider.