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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...