I have 2 custom field (sales stage, commercial stage) depends on the selection of this 2 fileds another field called stage is populated
now I need to make a validation on stage if it’s has a value form commercial stage do not update form sales stage
I try this script but not working
frappe.ui.form.on("Sales Order Item", {
refresh: function(frm) {
if (frm.doc.stage == "90") {
frm.doc.items.forEach(function(item) {
stage = flt(commercial_stage) - 0;
});
frm.refresh_field("items");
}
}
});