Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • Madrid
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

Testing for mobile devices in scripts

Log in to subscribe to topics and get notified when content changes.

Testing for mobile devices in scripts

Use the gs.isMobile() method to determine whether an action was taken through the mobile UI.

Business Rule

To write different messages to the log for actions through the mobile UI and through the standard browser UI, use the following script in a business rule.
if (gs.isMobile())
  gs.print("submitted from mobile UI");
 else 
   gs.print("NOT submitted from mobile UI");

UI Action Conditions (not client)

To prevent a UI action from appearing in the mobile interface, use the following condition.

gs.isMobile()
Feedback