Hi, im trying to fetch item group from the detail and set value in child but when im console log its show frm.doc give me parent value. how do get the row that item_code got changed ?
frappe.ui.form.on('Stock Entry Detail', 'item_code', function(frm) {
console.log(frm.doc)
console.log(frm)
if (frm.doc.purpose == 'Manufacture') {
let itemGroup = frappe.get_doc('Item Group', frm.item_group) //something like this ?
frm.set_value("expense_account", itemGroup.expense_account); // set child field value ?
}
});