Hello! I Can't create RealEstateProperty entity with fields by REST. Here is my CURL code. Entity was created, but with defult values in fields:
if($curl = curl_init() ) {
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
$arParams = '{
"name": "Test",
"assignedUserId": "578c7227e8feef2a5"
}';
curl_setopt($curl, CURLOPT_POSTFIELDS, $arParams);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$answer = curl_exec($curl);
In logfile after creating i can see:
[2016-07-18 10:41:15] Espo.WARNING: E_WARNING: Invalid argument supplied for foreach() {"code":2,"message":"Invalid argument supplied for foreach()","file":"/var/www/admin/www/SOME_SITE.ru/application/Espo/Services/Record.php","line":471} []
[2016-07-18 10:41:15] Espo.ERROR: E_RECOVERABLE_ERROR: Argument 2 passed to Espo\Services\Record::beforeCreate() must be of the type array, string given, called in /var/www/admin/www/SOME_SITE.ru/application/Espo/Services/Record.php on line 523 and defined {"code":4096,"message":"Argument 2 passed to Espo\\Services\\Record::beforeCreate() must be of the type array, string given, called in /var/www/admin/www/SOME_SITE.ru/application/Espo/Services/Record.php on line 523 and defined","file":"/var/www/admin/www/SOME_SITE.ru/application/Espo/Services/Record.php","line":597} []
[2016-07-18 10:41:15] Espo.ERROR: E_RECOVERABLE_ERROR: Argument 2 passed to Espo\Services\Record::afterCreate() must be of the type array, string given, called in /var/www/admin/www/SOME_SITE.ru/application/Espo/Services/Record.php on line 536 and defined {"code":4096,"message":"Argument 2 passed to Espo\\Services\\Record::afterCreate() must be of the type array, string given, called in /var/www/admin/www/SOME_SITE.ru/application/Espo/Services/Record.php on line 536 and defined","file":"/var/www/admin/www/SOME_SITE.ru/application/Espo/Services/Record.php","line":601} []
Name is default and AssignedUser is NULL
if($curl = curl_init() ) {
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
$arParams = '{
"name": "Test",
"assignedUserId": "578c7227e8feef2a5"
}';
curl_setopt($curl, CURLOPT_POSTFIELDS, $arParams);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$answer = curl_exec($curl);
In logfile after creating i can see:
[2016-07-18 10:41:15] Espo.WARNING: E_WARNING: Invalid argument supplied for foreach() {"code":2,"message":"Invalid argument supplied for foreach()","file":"/var/www/admin/www/SOME_SITE.ru/application/Espo/Services/Record.php","line":471} []
[2016-07-18 10:41:15] Espo.ERROR: E_RECOVERABLE_ERROR: Argument 2 passed to Espo\Services\Record::beforeCreate() must be of the type array, string given, called in /var/www/admin/www/SOME_SITE.ru/application/Espo/Services/Record.php on line 523 and defined {"code":4096,"message":"Argument 2 passed to Espo\\Services\\Record::beforeCreate() must be of the type array, string given, called in /var/www/admin/www/SOME_SITE.ru/application/Espo/Services/Record.php on line 523 and defined","file":"/var/www/admin/www/SOME_SITE.ru/application/Espo/Services/Record.php","line":597} []
[2016-07-18 10:41:15] Espo.ERROR: E_RECOVERABLE_ERROR: Argument 2 passed to Espo\Services\Record::afterCreate() must be of the type array, string given, called in /var/www/admin/www/SOME_SITE.ru/application/Espo/Services/Record.php on line 536 and defined {"code":4096,"message":"Argument 2 passed to Espo\\Services\\Record::afterCreate() must be of the type array, string given, called in /var/www/admin/www/SOME_SITE.ru/application/Espo/Services/Record.php on line 536 and defined","file":"/var/www/admin/www/SOME_SITE.ru/application/Espo/Services/Record.php","line":601} []
Name is default and AssignedUser is NULL
Comment