2

I wanted to get the structure of Campaign and Campaign Member in Salesforce.

these two objects are connected via Lookup in the system but on the Campaign(Parent) object, it allows me to create a Roll-up Summary fields with summarized Object as "Campaign Members".

Aren't Rollup's only for master detail? Am I missing something here?

1 Answer 1

4

Some standard relationships support Rollup Summary Fields, despite being listed as a Lookup field. For custom relationships, Rollup Summary Fields are only supported on the Master-Detail relationship type. Note that CampaignId on CampaignMember is a Master-Detail relationship, despite not appearing as such in the UI. It supports cascade deletes, cannot be altered after creation, and enables Rollup Summary Fields.

5
  • Thanks for the explanation @sfdcfox.
    – Anurag
    May 16, 2019 at 17:48
  • Where could one see exactly which standard relationships are these special/hybrid ones?
    – Bloke
    Dec 20, 2021 at 1:14
  • 1
    @Bloke The documentation isn't organized that way, and I don't know of anyone that's ever compiled a list. Opportunity.AccountId is the notable Rollup Summary Field exception, others may exist, but I don't recall. There are a number of fields that either restrict cascade deletion or provide cascade deletion, even though they are only lookup fields.
    – sfdcfox
    Dec 20, 2021 at 6:20
  • 1
    Ha! Here's something from the docs, about Roll-up, it mentions only these three: Account--Opportunity, Opportunity--Opportunity Product, Campaign--Campaign Member (From this help article about Roll-up Summary Fields help.salesforce.com/s/… )
    – Bloke
    Dec 20, 2021 at 14:20
  • 1
    @Bloke Nice find. There's still other differences on some "magic" fields, but those are not all nicely consolidated in one place.
    – sfdcfox
    Dec 20, 2021 at 14:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .