How to set field as read only based on role

Abhijit Das7
Tera Expert

Hi Everyone,

 

I have to set field as read only based on role of logged in user. But the script in UI policy is not coming. The check field of script is not clicking 

rrrrr.png

 

Can someone suggest. How can I enable it.

 

Thanks in advance

2 REPLIES 2

Pratiksha Kalam
Kilo Sage

dhanrajb
Tera Guru

Hi @Abhijit Das7 ,

 

There are some limitations for UI Policies for specific scopes. I believe, scope that you are using is preventing you from running the script. Try creating UI Policy in some other scope, it might work. Still you can deactive the rule which is restricting. But I would strongly recommend not to touch OOB.

 

For checking user role in UI policy you can use below syntax

g_user.hasRole('role_name')

 

Regards,

Dhanraj.