Hello;
In the Assessment Plan, there is Assessment Result button at the upper left side corner of the Assessment Plan as shown in the below image.
How I can hide it for certain user and show it for certain user using permission?
If it is like other elements in the document, I can do this using permission level (by giving it higher level value).
Below is the code that is responsible for showing this button:
refresh: function(frm) {
if (frm.doc.docstatus == 1) {
frm.add_custom_button(__("Assessment Result"), function() {
frappe.route_options = {
assessment_plan: frm.doc.name,
student_group: frm.doc.student_group
}
frappe.set_route("Form", "Assessment Result Tool");
});
}
},