ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Delete all data from child table on Single Paged Doc Load


#1

How can I delete all the rows of child table everytime a single doctype is opened. Like let say first time I opened and inserted 7 records and saved it. Next time when I opened it again, I want all previous fields to be removed. How to achieve so?


#2

This Worked For Me

cur_frm.clear_table("table_name")
cur_frm.refresh_fields();