Fetching value from Item master to Sales invoice Item

I need to fetch item type from item master to sales invoice item table…Type of item_type in item master is Select and sales invoice item is data… I have tried below code but not working…Please help

cur_frm.cscript.custom_item_code = function(doc, cdt, cdn){
var child = locals[cdt][cdn];
“method”: “frappe.client.get_value”,
“args”: {
“doctype”: “Item”,
“filters”: {
“name”: child.item_code
“child”: child,
“fieldname”: “item_type”

@jagjyo2014 instead of above code you can use cur_frm.add_fetch(“item_code”, “item_type”, “item_type”) function in js file.

Deep Trivedi.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.