when i click reset button state has been in “Not Saved”
but when I click reset button I want to revert back to draft state and the fields but be editable.
May I know its is possible? and How it can be done in my .js
so far I done like:
frappe.ui.form.on(‘Monthly Schemes’, {
refresh: function (frm) {
if (frm.doc.workflow_state === “Done”)
frm.add_custom_button(“Reset”, function () {
cur_frm.set_value({“workflow_state”: “Draft”});
// cur_frm.save();