Closed mschop closed 3 years ago
Hello @mschop . Currently, there is no support for Custom Fields in Persons or Deals. We are working on this and will provide this support in future versions of the library.
Thanks for your report.
Just ran into this same issue trying to update an organization. Making a direct API call works without any problem, but could you please state this in the SDK docs? Had to spend several hours doing tests and talking with Pipedrive support, before using the direct call as a last resource. The whole idea of using a SDK is to not have to develop your own connector.
This library is basically pointless without support for custom fields. @DenisButCheR can we get an up date please. It's starting to feel like this library has been abandoned by Pipedrive.
Okay got it. You can't update custom fields with this SDK. Can you please note it under your documentation? I wasted my time searching around for nothing
@zeman @ikleiman @Koberum did you try the fix I provided in https://github.com/pipedrive/client-php/pull/16?
This also leaves out some fields that appear to be newer, such as the deal field expected_close_date. I saw the nifty callOnBeforeRequest callback provided, and it would allow you to add more stuff to the parameters:
//call on-before Http callback
$_httpRequest = new HttpRequest(HttpMethod::PUT, $_headers, $_queryUrl, $_parameters);
if ($this->getHttpCallBack() != null) {
$this->getHttpCallBack()->callOnBeforeRequest($_httpRequest);
}
But instead of fetching the parameters from the $_httpRequest using $_httpRequest->getParameters()
, when the api call is sent, it just does this:
$response = Request::put($_queryUrl, $_headers, Request\Body::Form($_parameters));
Note $_parameters
. I fiddled around with trying to set the $_parameters
array as a reference using &, but no luck there either.
Thank you for the patience and suggestions. The changes implemented in https://github.com/pipedrive/client-php/pull/48 should fix the issues with updating custom fields in deals, persons and organizations endpoints. Feel free to test it out
Hi,
I am just trying to update a person. It is working, except the custom fields of a person. Those are not handled by the PersonController. This seem to be a great bug in the code. When I add the following lines in the method
PersonController::updateAPerson
in line 455 it seems to work:This is clearly a bug in this lib for me and makes the whole lib pointless/useless.