Problem with setting Read Only an field form on alm_hardware table

Dario_C
Mega Sage

Hello, I have an issue with the "Assign to" field in the alm_hardware table. I'm unable to make it Read Only after a flag is activated. I've tried creating both a Client Script, a Business Rule, and a UI policy, but the field remains editable. I can't seem to figure out why. I'm attaching the screenshots below. Thank you.

 

1 ACCEPTED SOLUTION

Harsh_Deep
Giga Sage
Giga Sage

Hello @Dario_C ,

 

As I can see you are using onChange client script, Please use OnLoad client script and use below script-

g_form.setMandatory('assigned_to',false);
g_form.setReadOnly('assigned_to',true);

 

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.

View solution in original post

6 REPLIES 6

Danish Bhairag2
Tera Sage
Tera Sage

Hi @Dario_C ,

 

By any chance is the assign to field mandatory.If yes pls first make it non mandatory then make it read only

 

Like in ur script u can just add one more line before setting it as Read only. 

g_form.setMandatory('assign_to',false);

 

Thanks,

Danish

 

Danish Bhairag2
Tera Sage
Tera Sage

Also did u try putting an alert in your client script so that we can understand whether the script was getting called or not

 

Thanks,

Danish

 

Sandeep Rajput
Tera Patron
Tera Patron

@Dario_C Please check if the assigned_to field is mandatory on your form. If it is a Mandatory field, then it cannot be set to ReadOnly. You would need to make it non mandatory first.

Dario_C
Mega Sage

Dear @Sandeep Rajput  and @Danish Bhairag2 ,

 

Thank your for help.