I am trying to create case it's giving me
"Fatal error: Uncaught AlexaCRM\CRMToolkit\SoapFault: You should specify a parent contact or account. in D:\wamp64\www\php_crm\vendor\alexacrm\php-crm-toolkit\src\Client.php on line 1159"
My code:
<?php
/**
* Use init.php if you didn't install the package via Composer
*/
require_once 'vendor/autoload.php';
use AlexaCRM\CRMToolkit\Client as OrganizationService;
use AlexaCRM\CRMToolkit\Settings;
$options = [
'serverUrl' => '**********************',
'username' => '****************',
'password' => '*************',
'authMode' => '***********************',
];
$serviceSettings = new Settings( $options );
$service = new OrganizationService( $serviceSettings );
// create a new contact
$incident = $service->entity( 'incident' );
$incident->title = 'Test Created With Proxy';
$incident->description = 'This is a test incident';
$incidentId = $incident->create();
?>
Finally I created case by using following code:
The error is very clear, you must mention the customer of the incident - Parent account or contact. Check the below code, it should work (not sure about php syntax).
Reference
From the above link, adding another snippet for lookup field assignment: