Hello guys.
What is the current safest way to delete a Company and all its connections?
I already “Delete Transactions”, but I can’t Delete the company because:
Error:
Cannot delete or cancel because Company is linked with Shift Assignment Tool
I only need to keep the following:
Workspaces (and keep their order)
Wiki
Translations
Custom Scripts
Item Groups
Is there any convenient script for this that won’t break Erpnext?
It would be nice to be able to redo the Setup Wizard to Configure a new company, while keeping the rest of the instance intact.
ERPNext: v15.37.0 (version-15)
Frappe Framework: v15.43.0 (version-15)
Go to the company for which you want to delete all transactions. On the right, near the “Save” button, click the three dots(menu button) and select “Delete All Company Transactions.”
1 Like
Thank you Janarthanan, Already did that, but still can’t delete the company after that.
Go to System Console and do and run:
frappe.db.set_value("Shift Assignment Tool","Shift Assignment Tool",{"company":""})
This will remove the company link. Do this if any other doctype is causing same issue
Thank you for the help Aslam, the field could not be empty, so I added the name of the new company instead. So I think that part is done.
Now I have this error which I can’t find how to fix:
Cannot delete or cancel because Company is linked with Bisect Accounting Statements
You can do the same: Instead of shift assignment tool, Bisect Accounting Statements.