I created a new DocType with name DIY Icon Type 1, with the same content, pointing to DIY Simple and DIY Video. Everything remain the same. In DocType User, I now use DIY Icon Type 1 instead of DIY Icon Type and perform a Save again.
The result is the same; all rows are still removed before Saving.
I think the problem is the front end.
Can someone share what they think this issue might be?
If you havent made any changes in code that’s causing this. Then the problem is due to permission error. Click on Edit in “Your icons Settings” field. Then enable ignore permissions. Your issue will be resolved.
Line 68 is from the non-working, newer Frappe/ERPNext, while line 69 is from the working instance, which is a bit older.
Now, the reason why the newly added rows in Child Table vanish is because these records are put into the variable modified_table_fields in the non-working instance; they are not being put into modified_table_fields in the working instance.
Once the rows are in modified_table_fields, the lines below:
I had the same issue and solved it by using a promise-based approach: To make sure the database calls are completed before the save operation, it’s good to use promises. This ensures all operations are done sequentially and then update dirty state after updating the values: frm.dirty() marks the form as having changes, and it should be called after you have completed updating all the fields to ensure that the form gets saved correctly.