Setting up role permission

So the user permission is automatically created for that employee…
Actually it was removed.
Because whenever i set exit interviewer for the employee the user cannot see the profile anymore…
Can you check that at your end.
After setting the exit interviewer for the employee.

I don’t have an “Exit Interviewer” field. Where do you see it?

Sorry I Have Created a custom field in Employee.
So whenever i set the field to some employee, the profile is no longer available to the employee.
I dont get the reason for it.

It’s just a guess but having 2 user id’s on the Employee doctype might be triggering:

I suggest you create a new user and employee record and confirm that everything works as it should BEFORE adding anything in your custom field. Also, unless it’s critical to link to an employee, you could use a Data filed instead and just type the interviewers name in.

Depends on how many employees leave or get fired I suppose… :wink:

hi @Dbone
But how can i hide a custom button based on permission?
I mean i have created a custom button in employee.
and he is able to view that button so can i hide that button?
I want only HR User or Manager to view that Button.

Try Perm Level.

Its a custom button added using script.
I have not added it using customize form.

Please share all the customisations you have made to the employee doctype. Scripts and fields. Everyone can help you better this way.

I have added the button using script

cur_frm.add_custom_button(__(“Allocate Leave”),function(){{
leave_type:“Privilege Leave”,
callback:function(){frappe.msgprint(“Leaves Allocated”)}

I want to hide the button created using this script.
The button which is in toolbar.