Question

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

A non-profit organization needs to track volunteer shift assignments between individual Volunteer contact records and Community Event records. A single volunteer can participate in multiple community events, and a community event can have multiple volunteers assigned to it. The system must allow administrators to calculate the total volunteer hours worked directly on the Community Event record, and deleting a Community Event record must automatically delete all associated shift assignment records. Which TWO configuration steps should the Salesforce Administrator implement to meet these requirements? (Select 2 answers)

  1. Create a custom junction object with Master-Detail relationships pointing to both the Contact (Volunteer) object and the Community Event object.Answer
  2. Create a Roll-Up Summary field on the Community Event object to sum total hours recorded on the shift assignment records.Answer
  3. C
    Create a custom junction object using two Lookup relationships to allow flexible parent record deletion behavior.
  4. D
    Create a Roll-Up Summary field on the Community Event object by referencing a direct Lookup relationship to the Volunteer contact record.

Answer

The administrator must create a custom junction object with Master-Detail relationships to both master objects (Contact and Community Event) and create a Roll-Up Summary field on the Community Event object to sum the hours.
To model a many-to-many relationship between Volunteers (Contacts) and Community Events while satisfying cascade deletion and native aggregation requirements, a custom junction object with two Master-Detail relationships must be created. Once established, a Roll-Up Summary field can be added to the Community Event object to calculate total hours from the child records.

Step-by-Step Solution

1
Model the Many-to-Many relationship
Create a custom junction object (e.g., Volunteer_Shift__c) with two Master-Detail relationship fields pointing to Contact and Community Event.
Master-Detail relationships enforce cascading deletion of junction records when a parent record is removed and establish the parent-child structure necessary for native roll-up calculations.
2
Configure the Roll-Up Summary field
Create a Roll-Up Summary field on the Community Event object that aggregates the 'Hours' field from the child junction object records.
Roll-Up Summary fields are a declarative feature supported exclusively on the master side of a Master-Detail relationship.

Key Concept

Junction Objects and Master-Detail Relationships
Rate this question