How to prevent deleting a row in child table, based on some conditions?

Should mark this as answer

you can use

		frm.get_field("items").grid.cannot_delete_rows = true;
		refresh_field("items");
1 Like

frappe.call is an async function. So this may not work at all times. The browser may already deleted the row when frappe throws an exception.

1 Like