ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

How to give the display depends on based to role


I am using this eval:frappe.user.has_role(‘QA Manager’) && doc.pending_qa_approval == 1
but its not working
help me out


You can restrict via Perm level in the docfields.

Then allow only QA Manager role to read and write on that perm level.


its not working


Use this below method to display depends on based on role
eval:frappe.user.has_role(“System Manager”)


Are you sure we have access to frappe object in eval of depends on? I have only tried doc object untill now.

By the way… the better way to do is via field level permissions as suggested by @root13F.


Hello, @arokia
You should give @root13F 's suggestion a shot. Check out this link