I want to delete the entry of department in setup module. But it gave me below error
Root Department cannot be deleted
How can i delete the created entry from Setup module?
I want to delete the entry of department in setup module. But it gave me below error
Root Department cannot be deleted
How can i delete the created entry from Setup module?
Facing same issue any update
Are you trying to deleted “All Departments”? Note that this cannot be deleted as this is considered to be the root node of all the departments under it. You can however delete the other depts under “All Departments”. Same applies for all doctypes having tree structure, for example, Customer Group, Supplier Group, etc.
This is true the best op can do is rename the root department I guess.
That’s what I used to do when client would argue to change it.
Idk if its still allowed in v12.
This is not allowed currently. Unsure if it was allowed earlier. Currently, this root node cannot be edited or deleted.
This needs to be configurable per doctype. The current design doesn’t even make sense.
If you forcibly prevent deletion of all root records, then it brings up paradoxical questions like:
A better design would be a configurable option on the doctype as to whether or not root-level documents can be deleted. Going further: when the user attempts to delete a root level document, instead of automatically blocking or passing, prompt them with a warning about the consequences.
I’ve raised an issue about this:
https://github.com/frappe/frappe/issues/17378