Hi All,
I am trying to filter MRP field using Item Code field. Both the fields are in a child table of Stock Entry.
Here’s the client script i tried.
frappe.ui.form.on('Stock Entry', {
onload: function (frm) {
console.log(frm)
frm.set_query("custom_mrp", "items", function (doc, cdt, cdn) {
let row = locals[cdt][cdn];
console.log(row);
return {
"filters": {
"item_code": row.item_code
},
};
});
},
});
Please, help me out here. I don’t know where i am going wrong.