Selecting a Dropdown List Item Using External API and Agent Workspace Form
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2022 11:25 AM
In the past we have created a client script to retrieve, populate and select a dropdown field using and external API. Now in the agent workspace I am able to retrieve and populate all values in the dropdown field but unable to have the "saved" value display as selected within the field using the agent workspace form.
We were getting the dropdown options using the code below to mark the proper option as selected, but in the agent workspace for the options are always empty.
//We add options this way and it works in the agent workspace and the legacy forms
g_form.addOption("u_company_selection", company.companyId, company.companyName);
//We retrived the options like this and it works in the legacy form, but is always empty in the agent workspace.
g_form.getControl("u_company_selection").options;
Is there an easier way? Seems like a common thing to want.
If no, what changes would I need to make to get this to work using the agent workspace form.
0 REPLIES 0