Make fields from other table read only on a form.

Anish Reghu
Kilo Sage

I am on the rm_story form.

I have three fields here:

Product (Dictionary settings below)

find_real_file.png

 

Product owner:

find_real_file.png

 

 

Short description:

find_real_file.png

 

I use the following script to make all fields on the rm_story form read only in the on Load Client Script defined on the rm_story table.

var fields = g_form.getEditableFields();
for (var x = 0; x < fields.length; x++) {
g_form.setReadOnly(fields[x], true);

But the above said 3 fields are not set to read only. I know it is because these 3 fields are derived from other tables.

How to set such fields read only too while I set all fields in the form to be read only on Load?

And how to add an exception? (like) if I want the field 'Product alone to be editable and also set the Focus on that field on loading the form.

 

6 REPLIES 6

Looks like all the fields you are trying to make read only are mandatory, make them non-mandatory through dictionary over ride and then try the client script . Mandatory fields cannot be made read-only.

 

Thanks,

Vignesh

Dictionary override  is not possible. Please refer to my previous comments.