how to make all the variables read only on SC tasks after the task gets closed

VIKAS MISHRA
Tera Contributor

On the task form i can see all the variables are still editable after the task gets closed, how to i make them not ready only and i want this for any kind of SC_task raised in any cataloge item.

 

VIKASMISHRA_0-1676658539221.png

 

16 REPLIES 16

chaudharymahesh
Mega Sage

You can write a Catalog Client Script (type : onLoad), in script check if task state is closed complete, if yes, then use g_form.setReadOnly("var_name", true);

 

 

Also make the client script to execute on catalog task using, checkbox (applies on Catalog task) on client script form  

 

 

 

 

 

How can i do it for all the catalogue at a same time, becuase if i got to catalogue client script for one item and check the check box applies on catalogue task it works for that item only.

But i need to perform it for all the items 

BharathChintala
Mega Sage

@VIKAS MISHRA  you can try like this

function onLoad() {

if(g_form.getValue('state')==3)

{

 g_form.setVariablesReadOnly(true);

}

}

If my inputs have helped with your question, please mark my answer as accepted solution, and give a thumb up.
Bharath Chintala