Dear community,
Is there any way that I can overwrite a Role Permission using custom script?
Case Scenario:
-
Employee has a submitted leave application.
-
Employee will use a button to change value of a field. (unable to do this as Employee does not have a Submit permission)
-
This in turn will trigger an Email Alert
Current script
frappe.ui.form.on('Leave Application', {
request_cancellation: function(frm) {
has_permission(True);
cur_frm.set_value('requested_cancellation', 'Requested Cancellation');
});