Hi,
Iāve upgraded from 7.9 to 7.10.25 and found that some v4_1 API POST calls for set_relationship are not working properly.
Specifically, if I make a POST request to set_relationship between Opportunity and a custom module, the response from the API is a simple ācanāt open fileā, however, the relationship is actually created.
On a 2nd call of the same POST request (made as a test), it does return the correct response { ācreatedā:1 etc}
As the documentation now seems to recommend the use of the V8 API I tried that also, and got a similar response. The POST call to set the relationship returns a NULL, but it does create the relationship.
On a 2nd call, it gives the correct response.
SuiteCRM is 7.10.25, with PHP 7.3.16 on a Bitnami image, running on Ubuntu 16.04
It only appears to affect the Opportunity module (other modules respond as they should)
The call I make is:
$params = [
'session' => $session_id,
'module_name' => 'PT_Property',
'module_id' => $property,
'link_field_name' => 'pt_property_opportunities',
'related_ids' => array($opportunity),
'name_value_list' => array(),
'delete' => 0
];
$data = [
'method' => 'set_relationship',
'input_type' => 'JSON',
'response_type' => 'JSON',
'rest_data' => json_encode($params)
];
And this is the response:
App\Http\API\APIResponse Object
(
[errors:App\Http\API\APIResponse:private] => Array
(
)
[result:App\Http\API\APIResponse:private] => can't open file
)
As a workaround, Iām just ignoring the error and assuming it has worked. But its annoying!
Paddy