The CreatorCon Call for Content is officially open! Get started here.

Detect Mobile App from Business Rule

jdiegeliv
Mega Expert

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?

2 REPLIES 2

shloke04
Kilo Patron

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

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

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.