"g_form.getEditableFields()" does not work for read-only fields

bonsai
Mega Sage

I tried to use "g_form.getEditableFields()" in a UI action to get the field value for a field that was made read-only in the UI policy.

 

However, it seems that fields that have become read-only cannot be retrieved using "g_form.getEditableFields()".

I wanted to remove read-only from all fields before processing, but is it possible to create a UI action that removes read-only from all fields without using "g_form.getEditableFields()"?

 

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Technically speaking its possible but very bad idea to do so. You better:

use scripted ui policyas implemented in GRC you can  use scr.include (check BRules on policy exceptions if am not mistaken the table)

useonLoad cl.script and attach an event on your field ffired on ur conditions-best to use ternary operation in ur function in the same script. Surely there many ways to do it (like g_form.setRaadOnly(<fieldd name>,false)) but be aware that sooner or later problems are knocking on ur door.

 

 

note geteditablefields() indeed returns only editable fields

View solution in original post

1 REPLY 1

Community Alums
Not applicable

Technically speaking its possible but very bad idea to do so. You better:

use scripted ui policyas implemented in GRC you can  use scr.include (check BRules on policy exceptions if am not mistaken the table)

useonLoad cl.script and attach an event on your field ffired on ur conditions-best to use ternary operation in ur function in the same script. Surely there many ways to do it (like g_form.setRaadOnly(<fieldd name>,false)) but be aware that sooner or later problems are knocking on ur door.

 

 

note geteditablefields() indeed returns only editable fields