How to make a override user preference field to Readonly in Escalation policy
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2022 07:47 AM
Task:Is to make override user preference and default field to readonly ,except for admin Role user
we wrote client script to make readonly
It is working only in shift Escalation set table (cmn_rota_escalation_set)
But it is not working in front end.The override user preference field is editable but it should not be in editable format ,
It should be readonly
If anyone have the solution means Please reply
Labels:
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2022 04:11 AM
You can write UI Policy on the cnm_rota_escalation_tab table without any specific condition to apply to UI
if (g_user.hasRole('admin')) {
g_form.setReadOnly('your_field_name',false);
g_form.setReadOnly('your_field_name_2',false);
} else {
g_form.setReadOnly('your_field_name',true);
g_form.setReadOnly('your_field_name_2',true);
}
}