I am creating an event using trigger and I'm also creating an invitee using the EventRelation object. When I go to that particular event, the invitee is shown on the list but when I go to that invitee's Home tab, I am not getting any notification there.

But when I create an event manually and add invitees, then the notification is present on the invitee's Home tab. Any particular reason?

This is my trigger to create the event and add the invitees

trigger Calendar on Account (after insert) {
    for(account acc : trigger.new){
        if(acc.name != NULL){
              Event e = new Event();
              e.StartDateTime = system.today();
              e.EndDateTime = system.today();
              e.Subject = 'Testing1';
              insert e;

              EventRelation er = new EventRelation(EventId = e.id,
              RelationId = '00528000001JFlo', isInvitee = True);
              insert er;

1 Answer 1


I figured it out. Very silly actually. Had given the start and the end date as the same hence by the time I could log in to the Invitee's org, the meeting was over. All I had to do was change the end date and it showed up

You must log in to answer this question.

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