Topic: Migrate contacts to new company in FA

I had to create a new company database from an old one due to some inconsistencies in the old database.  Everything stays the same - customers, suppliers, CoA, company info.

I need a simple way to transfer the customer and supplier contacts from the old company to the new one.  I have seen the "Manual Import of Customers" entry in the wiki page, but there seems to be no export option in FA, and I'm not too conversant with SQL.

Can I copy the relevant DB tables and rename the company ID?  Any pointers would be appreciated.

Re: Migrate contacts to new company in FA

Sort of copying relative tables is easy for you.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Migrate contacts to new company in FA

All contacts for both suppliers and customers are recorded in two tables: crm_contacts and crm_person
If customers, suppliers data are the same in both company then copy the said two tables and modify table prefix will achieve your goal.

Phuong

Re: Migrate contacts to new company in FA

notrinos wrote:

All contacts for both suppliers and customers are recorded in two tables: crm_contacts and crm_person
If customers, suppliers data are the same in both company then copy the said two tables and modify table prefix will achieve your goal.

@Phuong, thanks for the tips.  I copied the three CRM tables from the old company to the new, but the contacts don't show up when I open the new company in FA.  However, when I run a backup of the new company and select "view backup" I see the tables with the copied details.

What am I missing?  Is there another file or table that needs to be updated?

5 (edited by mawulitse 03/15/2021 02:04:32 am)

Re: Migrate contacts to new company in FA

I was missing two tables, and found them based on this thread:
https://frontaccounting.com/punbb/viewtopic.php?id=7241

Below are the steps for anyone with basic knowledge like me.

1. Using phpMyAdmin or similar tool, identify the company prefixes. In this example I want to transfer the data from Company 0 to Company 1.

2. Using the RENAME feature under Operations, move the following tables to different names (delete might work but something could go wrong)
    1_crm_contacts     --> x1_crm_contacts
    1_crm_persons      --> x1_crm_persons
    1_cust_branch       --> x1_cust_branch
    1_debtors_master  --> x1_debtors_master
    1_suppliers            --> x1_suppliers   

3. Use the COPY feature under Operations to bring the data from the original company to the new company:
    0_crm_contacts     --> 1_crm_contacts
    0_crm_persons      --> 1_crm_persons 
    0_cust_branch       --> 1_cust_branch
    0_debtors_master  --> 1_debtors_master
    0_suppliers            --> 1_suppliers

That's it. Company 1 should now have all the contacts from Company 0.

Re: Migrate contacts to new company in FA

I think that will work.  Personally, I would probably just mysql -u root - p, and insert the records in a new table.  :-)

mawulitse wrote:

I was missing two tables, and found them based on this thread:
https://frontaccounting.com/punbb/viewtopic.php?id=7241

Below are the steps for anyone with basic knowledge like me.

1. Using phpMyAdmin or similar tool, identify the company prefixes. In this example I want to transfer the data from Company 0 to Company 1.

2. Using the RENAME feature under Operations, move the following tables to different names (delete might work but something could go wrong)
    1_crm_contacts     --> x1_crm_contacts
    1_crm_persons      --> x1_crm_persons
    1_cust_branch       --> x1_cust_branch
    1_debtors_master  --> x1_debtors_master
    1_suppliers            --> x1_suppliers   

3. Use the COPY feature under Operations to bring the data from the original company to the new company:
    0_crm_contacts     --> 1_crm_contacts
    0_crm_persons      --> 1_crm_persons 
    0_cust_branch       --> 1_cust_branch
    0_debtors_master  --> 1_debtors_master
    0_suppliers            --> 1_suppliers

That's it. Company 1 should now have all the contacts from Company 0.