- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 05:19 AM
I'm trying to make a field read only for a user with a specific role.
In the script associated with the UI Policy I have
function onCondition() {
gs.hasRole(x_9004_invoice_que.mgr);
}
We only have one user with this role however it is making the field read only for all users
Appreciate any assistance with this
Solved! Go to Solution.
- Labels:
-
Instance Configuration

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 05:25 AM
Create a ACL to make the field readonly. It also restricts list view.
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 05:41 AM
HI Angus,
You can achive this fucntinality using 3 ways
1) ACL - Highly recommended
2) Client script
3) Ui policy
1) ACL:
Check the below link
restricting access to certain fields on a form
2) Client script
function onLoad() {
var isXYZUser = g_user.hasRole('x_9004_invoice_que.mgr)');
if (isXYZUser){
g_form.setReadonly('request_date',true);
//Similarly make all the required fields read only
}
}
function onCellEdit() {
Implement the above kind of logic here to handle the list view locking
}
UI Plocliy
In 'Execute if true'-
var isAdmin = g_user.hasRole('x_9004_invoice_que.mgr');
if(isAdmin)
{
g_form.setReadOnly('fields1', true);
}
In 'Execute if false'-
g_form.setReadOnly('fields1', false);