Hi @ESP_Luffy,
Please check the syntax.
frappe.ui.form.on('Your DocType', {
refresh: function(frm) {
if (frm.doc.docstatus == 1) {
$('.row.form-dashboard-section.form-links').hide();
}
}
});
// OR
// If you apply the workflow in doctype then apply it
frappe.ui.form.on('Your DocType', {
refresh: function(frm) {
if (frm.doc.workflow_state == "Approved") {
$('.row.form-dashboard-section.form-links').hide();
}
}
});
Reference:
Please set the doctype and workflow state in the script according to the scenario.
I hope this helps.
Thank You!