Jump to content

Recommended Posts

Posted

I need to get the value of a custom field based on either client_id or username from an API call in an external application. I was hoping wither Users::getByUsername or Clients:getSettings would return the custom fields, but they don't.    Anyone know how I can accomplish this?

Posted

found it, Clients:getCustomFieldValues, but it returns nothing, no response, no errors

 

$data = array(
'client_id' => $client_id
);
$response = $api->get("Clients", "getCustomFieldValues", $data);
 
print_r($response->response());
print_r($response->errors());
Posted

What is the response? null? That method always returns an array.

 

If the array is empty, then I suspect the client does not have any values set for any of the available custom fields. Perhaps the custom fields were created after the client already existed?

Posted

One of the following would likely be true:

  1. The client doesn't have any custom field values
  2. The API call or credentials are invalid
  3. The API call causes a fatal error or exception in the application
  4. The API call never gets executed

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...