-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
I'm trying to create a new appointment using the toolkit, but fail when setting the organizer or the required people.
Error messages:
- No parse handling implemented for type EntityCollection used by field organizer
- No parse handling implemented for type EntityCollection used by field
- No parse handling implemented for type EntityCollection used by field optionalattendees
$clientOptions = include(ROOT . '/system/config.php');
$clientSettings = new Settings($clientOptions);
$client = new Client($clientSettings);
$metadata = MetadataCollection::instance($client);
$salesorder = $client->entity('salesorder', $salesorderid);
$appointment = $client->entity('appointment');
$appointment->subject = $subject; //Betreff
$appointment->ownerid = $systemuserid;
$appointment->regardingobjectid = $salesorder;
$appointment->description = $description;
$appointment->statuscode = 1;
$appointment->statecode = 0;
$appointment->scheduledstart = strtotime($startdatetime);
$appointment->scheduledend = strtotime($enddatetime);
$appointmentID = $appointment->create();
$appointment = $client->entity('appointment', $appointmentID );
$appointment->requiredattendees = new EntityReference ('systemuser', $systemuserid);
$appointment->update();
where is my mistake or how can I fill the appropriate fields
Metadata
Metadata
Assignees
Labels
No labels