How to make a override user preference field to Readonly in Escalation policy

Manikandan Than
Tera Expert

Task:Is to make override user preference and default field to readonly ,except for admin Role user

we wrote client script to make readonly

find_real_file.png

It is working only in shift Escalation set  table (cmn_rota_escalation_set)

find_real_file.png

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

find_real_file.png

If anyone have the solution means Please reply

1 REPLY 1

Alp Utku
Mega Sage

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);

}

}