Skip to content

Unable set organizer in Appointment (EntityCollection) #73

@Wirbelrind

Description

@Wirbelrind

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions