I’m having trouble getting the new row to show up in the table. The data is there when I test msgprint the new_row. The row just doesn’t show up in the table.
Thanks for any help!
frappe.ui.form.on("Item", "validate", function(doc, cdt, cdn) {
var d = locals[cdt][cdn]
frappe.call({
method:"erpnext.stock.Stock_custom_methods.check_eq_items",
args: {
doc: d
},
callback:function(r){
//if(r.message == "item not in table"){
var new_row = frappe.model.add_child(d, "Quote Item", "engine_compatibility_");
new_row.name = d.item_code;
new_row.item_name = d.item_name;
new_row.item_group = d.item_group;
new_row.brand = d.brand;
//}
}
});
refresh_field("engine_compatibility_")
});
@rmehta your code sort of works when I placed the refresh_field in the callback as suggested by @makarand_b.
I see the row show up during the freeze when saving, but it disappears as soon as the freeze is over. Nothing happens when the refresh is placed outside the callback.