Employee referral issue

Hello,

When an employee refers to someone, after submitting the form he/she is getting a button to reject employee referral and create a job applicant.

Screenshot%20from%202022-03-29%2012-40-09

I want to hide those buttons for particular employee role. Any suggestions?

Thanks

Hi @erpnxt_user,

Please apply it:

frappe.ui.form.on('Employee Referral', {
    refresh(frm) {
        if(frappe.user=="user1@example.com") {
    setTimeout(() => {
        frm.remove_custom_button('Reject Employee Referral');
        frm.remove_custom_button('Create Job Applicant');
        }, 10);
    }
    }
});

Please set if condition according to you.

Thank You!

1 Like

Thanks mate

1 Like

can you advise me something for this also?

Thanks