Loading

Retrieve a Parent Event or Master Event from Child Events in Salesforce

Publiceringsdatum: Jun 2, 2026
Beskrivning

When you create an event with invitees in Salesforce, two Event records are created in the backend: one parent event and one child event. The parent event has the field IsChild = false, and the child event has IsChild = true. Both records share the same Subject and WhatId (the related record, such as an Opportunity or Account).
You can verify this by querying the Event object and filtering on the IsChild field to identify which records are parent events and which are child events.
Note: There is no direct parent-child relationship field on the Event object in Salesforce. Identifying the parent event from a child event requires a workaround using shared field values.

Lösning

To retrieve the parent event from a given child event, you can use the following workaround. Query for an Event record that shares:

  • The same WhatId as the child event
  • The same Subject as the child event
  • IsChild = false

This combination uniquely identifies the parent event in most cases.
Important Limitation: If two events have exactly the same Subject and are related to the same WhatId, this query returns multiple results. In that case, additional filtering (such as by date or CreatedDate) may be needed to isolate the correct parent event.
It is also possible to create a report in Salesforce with the condition IsChild set to False to generate a list of all parent event records in your org.

Example SOQL to Find the Parent Event

Given a child Event ID, to find its parent event, query:
SELECT Id, Subject, IsChild, WhatId, WhoId FROM Event WHERE IsChild = false AND Subject = '[Subject of Child Event]' AND WhatId = '[WhatId of Child Event]'
Replace [Subject of Child Event] and [WhatId of Child Event] with the actual values from the child event record.

Knowledge-artikelnummer

000386330

 
Laddar
Salesforce Help | Article