There is my code
frappe.ui.form.on("Purchase Invoice","refresh", function(frm, doctype, name) { cur_frm.doc.grand_total = 10000; // some value based on some calculation cur_frm.refresh_field('grand_total'); });
Here I am trying to change ‘grand total’ value based on some calculation in ‘refresh’ but it is not changed. Can anybody explain, why this is happening?