
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2019 03:26 AM
Hi all,
I had implemented "navigator.appVersion" for CMS Portal pages to get OS Name (like Win/ Mac/ X11/ Linux). But when moving to Service Portal pages in ServiceNow, I am unable to use the same code on client script.
Could you please help me a way out to detect appVersion(OS) or userAgent(device) in Service Portal widgets?
Thanks & regards,
Pranshu
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2019 03:45 AM
You can include $window in the list of parameters of the client controller and to use $window.navigator.userAgent and $window.navigator.appVersion inside of your code.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2019 03:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2019 03:45 AM
You can include $window in the list of parameters of the client controller and to use $window.navigator.userAgent and $window.navigator.appVersion inside of your code.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2019 05:44 AM
Thanks @OlegKi.
Just to add, I was able to use $window as window without adding anything to the parameters in client controller.