add option in client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2022 09:49 PM
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');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2022 09:52 PM
Disabled as in? Deactivated?
To answer your question, Yes, This client script would work to add the new option
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2022 10:04 PM
No disabled means through another client script in the global domain we removed it using the remove option
so any prob?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2022 10:05 PM
Nope, it will work just fine.
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2022 11:00 PM
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');
}
}