Jump to content

Recommended Posts

Hello All,

 

I have looked around and even found a 2 year old request that was being considered but nothing on changing the client ID.

I have an idea of what needs to be done via SQL but it would be easier to click a few buttons.

Is there a built-in way or add-on way to accomplish this?

 

Thanks!

Link to comment
Share on other sites

Is there a built-in way or add-on way to accomplish this?

there'll be no built-in way to do it from the admin area, and I can't think of an addon that can do it... though there may be one lurking in Marketplace that i'm unaware of.

 

perhaps if the client hasn't made any orders, tickets, domains, hosting etc, then you could potentially alter their ID direct in the database.... but once they have, then it's a whole different kettle of fish because that ID will be cross-referenced on multiple tables.

 

is there any reason you want to do this ? I suppose the obvious one is to give the impression you have more clients that you actually have - but other than that, I can't see a reason for this. :?:

 

if you just want the change to affect future clients, then you could do as John suggests in the post below...

 

https://forum.whmcs.com/showthread.php?41567-Change-Client-ID-Numbers&p=199510#post199510

 

This is possible by changing the autoincrement value of tblclients. As always before editing the database please backup.

but i'd be very wary of trying to modify an existing client ID value - it could be done, but get it slightly wrong (just miss out one table) and you could be starting a nightmare to resolve. :cry:

Link to comment
Share on other sites

I do fully comprehend the whole relational database issue with doing this and while I can code it by hand, I was hoping it was done already.

There would have to be checks at every level to insure that the same number doesn't already exist etc, then replacing the old number with the new number.

This would also have to be "constantly checked" against new tables and updates from WHMCS because 1 location where the ID isn't checked and we pretty much failed.

 

No marketplace stuff that I saw.

 

The purpose is we bill from another platform and to maintain the same client ID would be nice and reduce any confusion on either the client side or ours.

 

*** If I would have realized it when I first started importing and playing with the system, I would have totally changed the client id right in the client table from the word go.

 

 

Thanks!

Link to comment
Share on other sites

Just for reference, I am NOT going to share here the way this was done, as it requires some real solid experience in order to restore tables, backup tables, maniuplate data etc.

I just want to share that you that you can do it, if you are savvy with some SQL commands, you can extract the names of 17 tables that would need to be updated (not including any 3rd party apps/modules/addons

), then have a simple sql command to update the old number to the new number.

*Note if you do have addons, this will be a little more complicated and additional checking of data before and after the conversion of a sample record is EXTREEEEEEEEEMLY recommended.

 

 

From what I can tell now that I'm about 200 hours into my conversion, I would recommend 2 methods to make everything safer, if I knew then what I know now, this would have been my choice:

#1) Importing your clients from the begining from your previous system, just the client and information stored in tblclients, including of course the client id from your previous accounting system.

Then building the rest of your informatin for domains and services from there insuring no issues will arise.

 

#2)Create your clients ONLY, no domains, no hosting services etc, export that from mysql to excel, manually update that table in excel, once very sure, delete the clients table and import your updated spreadsheet.

 

I can't stress enought BACKUP BEFORE YOU DO ANYTHING! if you can run a TEST system, but make sure you are careful, this is pretty basic stuff when you have done this for many years (still tedious).

 

** You are doing this at your own risk! **

 

Good Luck if you are going to try it!

Link to comment
Share on other sites

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated