You cannot delete a legal entity if there are references to it in departments.
To delete a legal entity created by mistake:
- In the Legal entities dictionary, select the legal entity you want to delete
- Use the Delete line context menu item or the Edit > Delete line main menu item or use the Ctrl + Del key combination
- Save the changes in the dictionary using the Document > Save document main menu item or the button on the toolbar.