- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2018 10:12 AM
I am currently working on allowing our users to access SN on mobile devices. When a user is accessing our SN instances from a mobile browser, we only want them to see the Service Portal. There are 2 ways that I'm thinking of doing this:
1. Create a script include that returns true if the user is on a mobile browser.
2. Check the transaction log table for the useragent
The problem with 1 is that I havent found any method that allows me to get the browser data correctly.
The problem with 2 is that the transaction log table isnt updated when the user is on the Service Portal.
I wanted to know if there was any way in a script include to determine what browser is currently in use?
Or
Is possible to get the transaction log table to log browser information when a user is on the Service Portal?
Or
Is there some other way of doing this that I havent found yet?
If its not possible, i
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2018 08:40 AM
I have found out from ServiceNow that gs.IsMobile does not run on Menu Item in Service Portal. I will have to use CSS to hide a link on my navigation menu. Thank you for everyones help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2018 10:53 AM
Have you tested it? I created a simple business rule that executes this code upon the creation of an incident:
if (gs.isMobile())
gs.info("submitted from mobile UI");
else
gs.info("NOT submitted from mobile UI");
I logged in via Safari on my Mobile to the Service Portal and created an incident and the "submitted from mobile UI" was logged. When using desktop browser "Not" was logged.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2018 08:40 AM
I have found out from ServiceNow that gs.IsMobile does not run on Menu Item in Service Portal. I will have to use CSS to hide a link on my navigation menu. Thank you for everyones help.