hai i want to copy cost_center field from Journal entry(parent) to Journal entry Acoounts(child) grid. i tried this…but it not worked…pl help me to know the answer
frappe.ui.form.on("Journal Entry", "validate", function () {
for (var i =0; i < cur_frm.doc.journal_entry_account.length; i++) {
cur_frm.doc.journal_entry_account[i].cost_center = cur_frm.doc.cost_center
}
cur_frm.refresh_field('Journal Entry Account')
});