Client Script g_form.setReadOnly() not working.

JavaScriptMaest
Giga Contributor

g_form.setReadOnly() method not working when I run it through Client Script, but it works when I run the same on the JavaScript Executor(Ctrl + Alt + Shift + J), is there a way to debug and know what is stopping my Client Script code to not work on setting the field read only. 

The Client Script is:

 

find_real_file.png

1 ACCEPTED SOLUTION

Are there any UI policies that are conflicting with your client script?

View solution in original post

24 REPLIES 24

Nope, there are no mandatory fields.

have you tried to add the line? 🙂

I have tried setting the mandatory fields to true and false, it works for setting mandatory but it does not work for setting read only.

find_real_file.png

are those fields - variables in variable sets?

 

Nope, it is not a Catalog Client Script.