Jump to content
  • 0

Api Method Of Changing Client Id_Value


Question

4 answers to this question

Recommended Posts

  • 0
Posted

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.

  • 0
Posted

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.

  • 0
Posted

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));
...
?>
  • 0
Posted

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.

Join the conversation

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

Guest
Answer this question...

×   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...