I am trying to programmatically invite additional users to a meeting when creating a meeting. However its not working.
Here is the code I use to create a meeting for a Case. I added the user_invitees line thinking that might be all that is needed. This is a comma separated list of user ids I want invited when the meeting is created.
$meeting = BeanFactory::newBean('Meetings');
$meeting->name = $bean->name;
$meeting->date_start = $dateTime;
$meeting->duration_minutes = (intval($bean->schedule_duration_c) / 60);
$meeting->assigned_user_id = $bean->assigned_user_id;
$meeting->assigned_user_name = $bean->assigned_user_name;
$meeting->description = $bean->name . " - Case assigned to: " . $bean->assigned_user_name;
$meeting->status = "Planned";
$meeting->contact_id = $bean->contact_id;
$meeting->parent_id = $bean->id;
$meeting->parent_type = 'Cases';
$meeting->update_vcal = false;
$meeting->user_invitees = "619a19b0-4d61-0a33-45fb-633de26eba7a,9e8991a2-b8df-fe5f-2fb0-6304fe418a2d,489560de-6cc7-301c-d3f3-635179155ea5";
$meeting->save();
Is there something else needed or should I just use a SQL statment:
INSERT INTO meetings_users (id, user_id,meeting_id,accept_status, date_modified)
VALUES ($id, $userid, $meetingid, 'accept', date())
Tony