Catalog Client Script not working on Employee center with g_form add and clear options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 10:57 PM
Hello,
I am having and issue with a Catalog Client Script in the Employee Center that is not populating a choice list with options as it is in the normal Service Catalog. I have set the Client Script UI Type to all as you can see in the screenshot I have provided.
As I said, it works exactly as expected in the normal Catalog, but in the Employee Center, the drop down just has None.
Any help would be appreciated.
Thanks,
Josh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023 01:44 PM
I don’t think k you need to use variables. When using getValue(), you can just do getValue(‘firldName’)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023 03:03 PM
Hi @Josh Evans
Replace the
var getReason = g_form.getValue('variables.reason_for_leaving');
with
var getReason = g_form.getValue('reason_for_leaving');
and in all g_form.addOption() remove the "variables" , keep the fieldName only.
using variables works in workflow, not in catalog client script.
-Thanks,
AshishKMishra
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution