jbatalha Posted October 14, 2013 Report Posted October 14, 2013 I've dug around trying to find a way to assign the Client's id_value field through the API, but I can't seem to find it. Can anyone point me in the right direction? Quote
0 Michael Posted October 14, 2013 Report Posted October 14, 2013 You'll need to go into the database for the client you wish to change. But I believe you need to edit a few more than one table if they have a service with you. Paul, Cody or Tyson can help you. Quote
0 jbatalha Posted October 14, 2013 Author Report Posted October 14, 2013 Hello, Thank you for the reply. I'm not very excited about opening remote mysql connections between these two servers. It defeats the point of using the API for anything else. But... if there really isn't a clean way to do it, I'd love to hear feedback on exactly what do I need to change in the database in order to make it work consistently. Quote
0 Tyson Posted October 14, 2013 Report Posted October 14, 2013 The id_value is not meant to be changed explicitly since it is a function of several company settings and previous values. The company settings that affect this are not fully implemented, but include clients_start, clients_increment, clients_pad_size, and clients_pad_str. If you wanted to change the start value from 1500 to 2000, you could try the following (warning: I have not tested this): <?php ... $api = new BlestaApi($url, $user, $key); $response = $api->put("companies", "setsetting", array('company_id' => 1, 'key' => "clients_start", 'value' => 2000)); ... ?> Michael 1 Quote
0 jbatalha Posted October 16, 2013 Author Report Posted October 16, 2013 Thank you for your answer. The thing about id_values is that they are being displayed to the user... so if it is displayed, it has to make sense to them. A great deal of our companies' internal organization relies on Client numbers, so it's not an option to change them all over. I will try your code to change the id_values just after I create the clients and see if any info is lost when using those. Best regards. Quote
Question
jbatalha
I've dug around trying to find a way to assign the Client's id_value field through the API, but I can't seem to find it.
Can anyone point me in the right direction?
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.