Client Scripts UI Type - Desktop, Mobile, or Both?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2017 04:19 PM
We've recently discovered the issue with Client Scripts not functioning properly in our Service Portal. The fix seems to be simple- switch the UI Type from "Desktop" to "Both" for the Client Script. My question is, why wouldn't this be the default? Is there any reason why I shouldn't just set all of my Client Script UI Types to "Both"? Currently we have a few set to "Mobile" and all others that haven't been switched to "Both" are still as "Desktop".
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2017 06:06 PM
Hi John,
the answer is quite simple: you need to be able to separate both types sometimes, because some functions are different or not available for the mobile version/native app and you will want to avoid errors.
See also this article - it starts with: "Client scripting for mobile is identical to scripting for the web, with some exceptions."
Mobile Client GlideForm (g form) scripting
Kind regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2017 05:35 AM
That answers the question for me. We haven't started using the mobile application yet, so I didn't give it much consideration. Thanks, Sebastian.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2018 04:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2017 09:23 AM
Hi John -
There is no technical reason why we couldn't set the default to "Both". In fact, it makes great sense as it would likely result in fewer people having to remember to change it as you point out in your original post. The response currently marked as correct doesn't really make sense as using the appropriate API methods is necessary regardless of what value is in the UI Type field.
The reason the default value is Desktop is that that was the primary use case when the UI Type feature was added; purely historical reasons and not technical.
If you feel strongly about the default value, edit the Dictionary entry for UI Type and set a new Default value.
Happy Scripting!