Hiiii,
Please I need help to copy parent field data to child table… I tried the following script but not works
Parent Doctype is BPE
Field in Parent Doctype is name_22
Child table filed in Parent Doctype is table_2
Field in child table is name_11 Note: Parent and child table is customized not standard Doctypes
frappe.ui.form.on(“BPE”,“refresh”, function(){
for (var i =0; i < cur_frm.doc.table_2.length; i++){
cur_frm.doc.table_2[i]. name_11 = cur_frm.doc.name_22
}
cur_frm.refresh_field(‘table_2’)
});
Saving twice: that might be related to the trigger. You can also use a different trigger than refresh, maybe the change of the name_22 or something like this. Refer to Developer Cheatsheet · frappe/frappe Wiki · GitHub for details on the triggers…