Detect Mobile App from Business Rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2018 03:22 PM
Hello, I created a business rule with the following criteria:
Advanced = True
When to run - When: Before
When to run - What: Query
Advanced Tab - Condition: gs.isMobile()
Back in Geneva that would only work on Mobile Web but it looks like PRB691470 fixed that. However, my script only runs when they are on the Mobile Web which I don't actually need but doesn't hurt anything. I need it to run on Mobile App. What condition could I use for that?
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2018 04:27 PM
Hi,
It should not affect as it's a server side functionality and your Business rule should run on Mobile platform as well without any addiootnal check on the UI type whether it's a desktop or Mobile.
If the script is not getting executed, you may need to check if any Unsupported functions are not getting used. It's worth looking at the below link for further details:
https://docs.servicenow.com/bundle/london-platform-user-interface/page/script/client-scripts/reference/r_MobilePlatformMigrationImpacts.html
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2018 09:21 AM
You are correct. Thank you sir.
After further testing it would appear that my issue is that gs.isMobile() is always returning false. I opened a support ticket for it.