Hi, can someone help me to filter user name based on user role? The below doesn’t work.
frappe.ui.form.on("BT Request", "onload", function (frm, cdt, cdn) {
frm.set_query("exp_approver", function () {
return{
filters: [["UserRole", "role", "=", "Leave Approver"]]
}
});
});
I have custom doc type with field exp_approver and option User. But this gives me all users and I would like to list only users from a group. Thank you.