Hide Unhide a particular field based on roles using client side scripting

I need to hide a field for a particular role & unhide for all other rows


cur_frm.toggle_display("fieldname", false/true) to hide / unhide field


you can get the user roles in user_roles variable then you can check against the particular role and hide the field as per @Sangram suggession.


if(inList(user_roles, “Employee”)) {
//hide field

Thanks, Makarand

Thanks @makarand_b & @Sangram a lot :).
Its working.
Sorry to trouble you but can i change the column width of the list view ?


for column width check below thread