Cannot Re-create a Deleted Company (Company Already Exists Error)


I created a new company in a multi-company setup but noticed that the company did not pull chart of accounts based on existing company. I deleted and tried to recreate now i get the error “Company Already Exists”. I have cleared cache both from front end and back end and i have rebooted but i still have the error. Can someone please tell me what i might be missing?


Can somebody please tell me how to recreate the company? I have tried every info I can find and it still keeps telling me company already exists. Is there a way I can completely flush the company out and re-create it? Any help will be appreciated.

Create a new company with another name. Then rename it, check “merge with existing” checkbox while renaming.


Thanks for your feedback. However, I got this error when trying to rename:


I also found that the root node for chart of account for the company previously deleted still exists:


This cannot be deleted as there is no way to delete it from the front end. I am presuming this is the existing data preventing me from re-creating the company. Any tip on how I can get rid of it?

Better reinstall the site

Well that’s not an option for me as so much data has been entered already.

You could create a “fresh” install in a VM, then import all the database items there and do the clean up, and then transfer it back to your live machine

Well i realized i had a backup just before the error and restored. So my issue is fixed. I think strong consideration should be given to the issue of chart of account not being deleted when a company is deleted successfully. I saw a thread from 2017 about this and based on my experience it seems not to have been resolved.