How to Make Formatter Variable section read-only in Form

Goutham Varma
Tera Contributor

I am using Formatter in form design to show all fields from record producer. When i tried to make every fields in read-only, the fields under variables section which is displaying those from record producer, all except reference fields are becoming read-only. How to make reference fields in variables sections also read-only?

 

currently i am using the below code :

var fields = g_form.getEditableFields();
for (var x = 0; x < fields.length; x++) {

g_form.setReadOnly(fields[x], true);

}

Variable Formatter.jpg

2 REPLIES 2

Voona Rohila
Tera Patron

Hi @Goutham Varma 

Can you check if there are any other client scripts applied on RITM that are making those variables editable.

I just tested and looks like it's bringing all the editable fields on ritm record with variable names as ni.<<variablesysid>>, keep below log and check the variable names.

 

var fields = g_form.getEditableFields();
g_form.addInfoMessage(fields);