I’m new to ERPNext and tried to search for the same scenario on the forum before posting this question:
My ERPNext is hosted on Frappe cloud and I need to delete about 27,000 stock item records at once. Currently, selecting more than 500 items times out (up to 500 is ok but is taking at least 10 minutes)and further, I have to make a permanent deletion after the fact; this making this process overly time-consuming.
My question, without accessing the bench, and ensuring that any mass-deletion does not delete impact any custom doctypes and fields that I have made, how can I delete all these stock items at once?
This is a bit of a tricky one because the safe execution API doesn’t expose any delete methods to Server Scripts or the System Console.
list => list.forEach(
item => frappe.db.delete_doc("Academic Term", item.name)
I have done this process.
You need to use Frappe Client, or access the DB directly.
https://github.com/frappe/frappe-client , It will be slow, but will get the job done.
Anything else may not work.