User wise Menu Custom

Hello Everyone,
How can we give selective menu options to users by user role?

  • For Example: If we have created the custom User desk then they should only view some fields like print, jump to the field and reload only instead of all In the menu option.

This is a menu which is showcased to all users.

Thanks In Advance

Hi @srushti,

That for please apply custom/client script.

If use the role set in the condition then will hide some options from the desk.

frappe.ui.form.on('Your DocType', {
	refresh(frm) {
	   if (frappe.user_roles.indexOf("Sales User") ==-1) {'[data-label="Email"],[data-label="Links"],[data-label="Rename"],[data-label="Delete"]').parent().parent().remove();

Please set your role and option according.
Then reload and check it.

Thank You!

Thank You It’s Working !!