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;
}
}