How to Make all form fields read-only except worknotes on Requested item form after closure?

Community Alums
Not applicable

Hi,

I want to make all the fields read only except worknotes on request table after closing a record. Please suggest me on this. Thank You!

 

Regards,

Ganesh 

1 ACCEPTED SOLUTION

palanikumar
Mega Sage

Hi,

You can try this client script to mark all field readonly:

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

Replace worknotes with actual field to exclude

Thank you,

Palani

Thank you,
Palani

View solution in original post

3 REPLIES 3

Jace Benson
Mega Sage

You can do this a number of ways.

  1. Access Controls
    • So this may be complicated but, /shrug, it is what it is.
  2. Data Policies
    • This should be just like ui policies, except they are enforced at the server level.

palanikumar
Mega Sage

Hi,

You can try this client script to mark all field readonly:

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

Replace worknotes with actual field to exclude

Thank you,

Palani

Thank you,
Palani

This is no longer an option in Vancouver (actually I think from Tokyo as well)