How to set display depends on the basis of session user role or role profile

We are looking for displays depends based on role or role profile. Is there any evaluation statement that can be written directly without using the server call-back method of the python script? This is not working

eval:frappe.user.has_role(‘Presales User’)

Please suggest , if someone have used it , Thanks

Hi @CA_B.C_Chechani,

Please try it.

eval:frappe.user.has_role('Presales User') == 1

OR

eval:frappe.user.has_role('Presales User') != 1

Then reload and check it.

Thanks.

Thanks a lot, it worked perfectly !