Study for the Salesforce Platform Developer Exam. Study with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

Practice this question and more.


Roll-Up Summaries are applicable to which type of relationships?

  1. Lookup relationship

  2. Apex relationship

  3. Formula relationship

  4. Master-Detail relationship

The correct answer is: Master-Detail relationship

Roll-Up Summaries in Salesforce are specifically applicable to Master-Detail relationships. This is because Roll-Up Summaries allow you to perform calculations on related records, such as summing values or counting records, and these operations are only valid within the context of Master-Detail relationships. In a Master-Detail relationship, there is a strong dependency between the master and detail records — when the master record is deleted, all associated detail records are also deleted. This inherent structure enables Roll-Up Summaries to aggregate data from child records and store it on the parent record. For instance, if you have a master record representing an Account and detail records representing related Opportunities, you could create a Roll-Up Summary field on the Account to calculate the total amount of all Opportunities associated with that Account. Other types of relationships, such as Lookup relationships, do not enforce the same level of dependency and do not support the Roll-Up Summary feature. This is because Lookup relationships are more loosely coupled; deleting a parent record does not necessarily delete the child records, which makes aggregating data in the same way inappropriate. Similarly, Apex and Formula relationships are not standard relationship types but rather programming or expression techniques, and they do not inherently support Roll-Up Summaries. Hence, Master-Detail