Hello Everyone,
I am facing issue with my custom script after upgrading to Version 11.
I was using the script to fetch data from the Sales Order item table to Custom Doctype Item table.
In both the documents, the sales order item table is linked.
The idea was to populate the items from Sales Order to a custom Job Card document.
Below is the script which I was using.
//Including sales order items on the internal job card.
frappe.ui.form.on("Internal Job Card", "sales_order", function(frm) {
frappe.model.with_doc("Sales Order", frm.doc.sales_order, function() {
var tabletransfer= frappe.model.get_doc("Sales Order", frm.doc.sales_order)
$.each(tabletransfer.items, function(index, row){
d = frm.add_child("items");
d.item_code = row.item_code;
d.item_name = row.item_name;
d.uom = row.uom;
d.description = row.description;
d.qty = row.qty;
frm.refresh_field("items");
});
})
});
Regards
SM