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.
The easiest way to automate the process might be just to loop through all the items and delete them with some javascript. It wouldn’t be any faster, but it would probably require less intervention on your part.