Make a field read-only on a condition

Riya17
Giga Contributor

I have a 'Release Phase' form and related list at the bottom. When I create a 'Release Task', the state field on release phase should be set to 'Ready' and read-only.  'Release Phase' is the parent and 'Release Task' is the child table.

The state should be 'ready' until all the release tasks under the Release Phase are completed.  Then the user has an option to choose any state.  How can I achieve that? Thanks

find_real_file.pngfind_real_file.png

5 REPLIES 5

Riya17
Giga Contributor

 

Ignore the above post but the below BR didn't work.

var gr = new GlideRecord("Release");
gr.get("0537233cdbced30049ddf1951d961917",current.rm_release);
gr.state = "2";
gr.update();