add option in client script

jobin1
Tera Expert

On load of sc_req_item i need to add one option in the state field which is already available in the choice list and is disabled for now for some reason so will  the below code will work for adding it back ?

 

g_form.addOption('state','104');

10 REPLIES 10

Aman Kumar S
Kilo Patron

Disabled as in? Deactivated?

To answer your question, Yes, This client script would work to add the new option

 

 

Best Regards
Aman Kumar

No disabled means through another client script in the global domain we removed it using the remove option

 

so any prob?

Nope, it will work just fine.

Best Regards
Aman Kumar

not working choice is in global  and below script in client domain but not working

function onLoad() {
if(g_form.getDisplayBox('cat_item').value=='Standard Invoice Query'){
g_form.addOption('state','104');
}

}

 

jobin1_0-1669964330307.png

 

 

jobin1_1-1669964378472.png