how to make variable read only,when catalog task state is closed complete

swathikrishanan
Tera Contributor

making the field read only based on catalog task   state

1 ACCEPTED SOLUTION

You can write a client script on Task table onChange on field name State.



var catalogitem = g_form.getValue('u_item');


if(catalogitem=='Your catalog Item')


if(newValue==closedvalue && catalogitem=='Your Catalog Item')


{


g_form.seReadOnly('variables.Yourvariablename',true);


}


View solution in original post

13 REPLIES 13

you want to hide or make it read only?


above you have mentioned you want to make read only?


Sorry read only


see if you don't have any condition like you have mentioned above. so you can simply create catalog ui policy to make your variable read only and don't forget to mark check on task level and ritm level check box.



if you have some condition then please explain what are that?



Thanks,


Harshvardhan


The condition is ,when ever catalog state is closed complete ,i need to make few variables read only in RITM and catalog task


when the task close then ritm state also get changed so simply write client script on sc_req_itm to when ever state get change then your variable should also get read only.



try with above script that i have mentioned.