- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2016 10:10 AM
Hi everyone,
I am trying to set a value to a catalog item variable via Catalog Client Scripts. It is working if being loaded in native UI but when opening in Service Portal the value is not being set. I'm really baffled at this. Anyone know why? Thanks - Regina
Here's the code (onLoad):
g_form.setValue('variables.url', 'test');
Native UI:
Service Portal:
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2016 11:35 AM
Hmm...could you post your entire client script? Also, make sure you have UI Type marked as Both on the catalog client script record itself.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2016 10:38 AM
If the name of the variable is url the code should just be: g_form.setValue('url', 'test');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2016 11:27 AM
Hi Brad i tried this too and is not working. Some were saying this is known Service Portal issue and has been addressed in Patch 6?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2016 11:29 AM
What type of variable are you populating? It's possible there may be a bug with a specific type.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2016 11:33 AM
I'm only using Single Line text..