You need to sign in to do that
Don't have an account?
Create an Event with pre fielded invitees
Is there a way to create an Event with some number of invitees from Apex?
Simple
Event e = new Event(any params here); insert e;
doesn't help. It can create an event but there is no possibility to add invitees programmaticaly.
It can be done from UI only. All we can do is to pre-fielled ids of users we want to invite to this event. But currently logged in user must push Save & Send Update button to create an event and send invitation e-mails to invitees.
What we think as workaround is to perform the same http POST request as SF perform after user clicks this button.
I tried to achieve this using HttpRequest class as well as PageReference. But no luck.
Maybe anyone had better luck than me?
I have done it with an Apex trigger.
How it can be possible to add invitees to an event from Apex? Even trigger. Trigger on what object and which event?
Yes Trigger on an other custom object which maps information with the Event object to add invitees to a particular event on the calendar
But how to add invitees to an event if SF doesn't give us such possibility (using Apex)?