---
schema_version: "1"
id: 41f4354c820415fdbf5a0839b5e7ecf70eb18a1034c54ca679dcd7ff94f9fd22
title: EventWhoRelation
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_eventwhorelation.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventwhorelation.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: a52feb83bf01aa8d885b1a90a5876746fb084b487b7d159866c1d5d3afde755a
description: Represents the relationship between an event and a lead or contacts. This derived object is a filtered version of the EventRelation object; that is, IsParent is true and IsWhat is false. It doesn’t represent relationships to invitees or to accounts, opportunities, or other objects. This object is available in API versions 29.0 and later.
---
# EventWhoRelation

Represents the relationship between an event and a lead or contacts. This derived object is a filtered version of the [EventRelation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventattendee.htm "Represents a person (a user, lead, or contact) or a resource (such as a conference room) invited to an event. This object lets you add or remove invitees from an event and use the API to manage invitees’ responses to invitations. If Shared Activities is enabled, EventRelation can also represent other objects that are related to an event. EventRelation does not support triggers, workflow, or data validation rules.") object; that is, IsParent is true and IsWhat is false. It doesn’t represent relationships to invitees or to accounts, opportunities, or other objects. This object is available in API versions 29.0 and later.

EventWhoRelation allows a variable number of relationships: one lead or up to 50 contacts. Available only if you’ve enabled Shared Activities for your organization.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

EventWhoRelation objects aren’t created for child events.

## Supported Calls

describeSObjects(), query(), retrieve()

## Fields

| Field Name | Details |
| --- | --- |
| EventId | 
Type

reference

Properties

Filter, Group, Nillable, Sort

Description

Indicates the ID of the event.



 |
| RelationId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

Indicates the ID of the contacts or lead related to the event.



 |
| Type | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

Indicates whether the person related to the event is a contact or lead.



 |

## Usage

Apex example that queries relations to a contact or lead

List<EventWhoRelation> whoRelations = \[SELECT Id, Relation.Name FROM 
EventWhoRelation WHERE EventId = '00UD0000005zijD'\];

#### See Also

- [Event](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_event.htm "Represents an event in the calendar. In the user interface, event and task records are collectively referred to as activities.")
- [EventRelation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventattendee.htm "Represents a person (a user, lead, or contact) or a resource (such as a conference room) invited to an event. This object lets you add or remove invitees from an event and use the API to manage invitees’ responses to invitations. If Shared Activities is enabled, EventRelation can also represent other objects that are related to an event. EventRelation does not support triggers, workflow, or data validation rules.")