+ Start a Discussion

Need help regarding EventRelation

Hi Guys,


I need some help regarding EventRelation. I read document related to the EventRelation i.e.  http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_eventattendee.htm . It says that  "Events can have up to 11 relationships when relating to Contacts: 10 Contacts and one other relationship to Account, Asset, Campaign, Case, Contract, Opportunity, Product, Solution, or custom object.". I tried in my dev org and able to create more than "11 EventRelation"  with contact. Is it something I am getting wrong?


Please suggest.




Hi Joo, 


This document and article are specific to the API, did you try adding contacts Via UI or API in your Dev Org? The Limits via UI would be different and there have been few additions recently regarding Shared Events and Multi-Person Events.





That's actually not true... I can create an event with 20 EventRelation records related to a Contact using the SOAP API. We don't have Shared Activities on.


So the docs say: "If you’ve enabled Shared Activities for your organization, an event can be related to up to 50 contacts or one lead. If you haven’t enabled Shared Activities, an event can be related to only one contact or lead."


So how do you explain that?


Even the 50 relation restriction doesn't seem to be true. I just created an event with 28 lead relations and 30 contact relations... 


That doc is old - the limit is 50 now.


You can add more than 50 relations if they are only invitees.  If they are Who relations (IsWho) the limit is 50.  Confusing - I know.  We'll get this sorted out eventually....


Just to clarify:


A releation can be either a Who, an Invitee or both.


Who relations are limited to 50

Invitee relations are limited to 1,000


Why the difference?  Who relations are evaluted in sharing checks, so it won't scale as well.  Invitee relations are not involved in sharing checks.




Kayvaan, I'm not clear on the distinction. In terms of the fields on the EventRelation object, is a "Who" an EventRelation with a RelationId pointing to a lead or contact and IsParent set to true?


Yes. IsParent says whether it's a parent (a who or what).  IsWhat refines that to say it's specifically a What parent.  If it's a parent but not a what it's a who. 


So a "Who" is an EventRelation where IsParent=true and IsWhat=false.  (Which also means it's point to a contact or lead).




I'm going to have one of our engineers review this and kick me if I'm wrong.  But I'm pretty sure that's right.


Last questions (maybe)


First: When shared activities is OFF, an event does not seem to appear on a Contact attendee's Activity History list. Is this the expected behavior? Am I missing something?


Second: I can't find any kind of relationship between a child event and it's parent event. I see an EventRelation under the parent with a User as an invitee, but no relationship between the two events that I can find. Am I missing something here?


With shared activities off - only the contact who is specified in the Name field would have the event show up in their activity history related list.  Other invitees would not.


With shared activities ON - you can relate more contacts to an event but it's a separate process from inviting them.  They have to be RELATED to show up in the related list.  If you just invite them they won't.  So if you invite 3 contacts to an event, you have to also relate them to get them to have the event in their history.


If you're just logging the event (not scheduling) then you can just related the contacts, you don't necessarily need to invite them (unless you really want to record them as attendees).

We want to collapse the concepts of relating and inviting - they are only separate because our legacy data model had the constraint of one related contact.  Now that you can relate AND invite multiple contacts there's not much reason to have those things be different concepts.  (Although there are some cases where users want to relate a contact but not invite them, which we'd still support).


Regarding the child events - no unfortunately you're not missing anything.  AFAIK there's not a good linkage between the master event and child events.  I can check if there is and get back to you.  Child events are also something we're trying to phase out.  They are kind of a clunky implementation.  Conceptually - we'd rather have one copy of the event and have the relation be the invitee's pathway into the event and store any invitee-specific data (like reminders, comments, responses, etc.).


Sorry for reviving the dead on this one.

But i would like some clearification on the whole Invitee vs Who relations.  because i thought an invitee can be a user, contact, or a lead, which is the same as who.

according to the EventRelations object (http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_eventattendee.htm) there can only be 50 attendees, correct?

  • An event can be related to up to 50 contacts or one lead.
David Roberts 4David Roberts 4
I've been trying to add the attendees as a related list on my custom controlled apex page but can't find a syntax that works.
I get errors like: "'EventRelations' is not a valid child relationship name for entity Event "

<apex:relatedList subject="{!anEvent}" list="EventRelations">
        <apex:facet name="header">Attendees</apex:facet>

where "anEvent" is my event record (public Event in controller) which succesfully returns all the fields of the event in a pageBlock.

​Any ideas?