---
sourceDocument: Brazil Mobile Configuration and Navigation
sourceDocumentLink: https://www.servicenow.com/docs/r/mobile

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Mobile Configuration and Navigation

ft:clusterId :

    - mobile

bundleId :

    - mobile

workflow :

    - Development, Data and Analytics


---

# Mobile scripting in offline

# Mobile scripting in offline {#ariaid-title1}

Release version: Brazil  
Updated October 28, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read  
Use mobile scripts to run reusable JavaScript on the user's device while offline, so offline buttons and write-back actions stay consistent with online behavior. Mobile scripts are a subset of web scripts, and are stored
centrally on the instance. The platform pushes them to mobile devices as part of the offline cache.
Mobile scripts, which is a subset of web scripts, are reusable JavaScript code written to run in ServiceNow mobile apps, including while the device is online. Each script is stored centrally on the instance in the Mobile script \[sys_sg_mobile_script\] table, and the platform pushes it to mobile devices as part
of the offline cache. You can call these scripts for mobile components, such as button conditions and write-back actions.

The model is similar to Script Includes, which are reusable server-side JavaScript that you define once and call from any script that needs it. A Script Include runs only when another script explicitly calls it, rather than running
automatically in response to a platform event like a record insert. Mobile scripts follow the same reuse pattern, though they run on the device instead of the server.  
Note:  
Mobile scripts created before the Brazil release continue to run. We suggest that you update your scripts and use the Brazil version-related syntax. Scripts you don't update currently function, but ServiceNow doesn't support any capabilities that stop working.

## Button conditions and write-back actions with mobile scripts {#mobile-script-concept__section_a31_hhq_clc}

Mobile scripts can be triggered from button conditions and write-back actions, which are the currently supported components. For more information, see [Button condition support enablement](https://www.servicenow.com/docs/7LqITWQXUesYKVprxeJKFA "Use mobile scripts to update data across multiple tables and to control button visibility and behavior, whether users are online or offline.") and [Write-back action support](https://www.servicenow.com/docs/Ih7dB8xdOgY6pZvRIwfIjg "Mobile scripting can use write-back actions and write-back-action steps, so data from multiple tables can be manipulated while offline and online.").

## Reference material {#mobile-script-concept__section_ifp_xhq_clc}

[Mobile Scripting API reference](https://www.servicenow.com/docs/access?context=api-mobile-scripting&version=brazil&pubname=brazil-api-reference&ft:locale=en-US): For details about mobile scripts' supported components, available classes and other API requirements.
* **[Configuring mobile scripts](https://www.servicenow.com/docs/tGotVAWOBiE4NOa9SjCJSg)**   
  Learn how to use mobile scripts and to configure within the Mobile script \[sys_sg_mobile_script\] table.
* **[Components that support mobile scripts](https://www.servicenow.com/docs/Q_nlvqOqlnSfvhTIL5~hgw)**   
  Review the components which use mobile scripting.
* **[Scripting logic for mobile scripts](https://www.servicenow.com/docs/OLvU2cKK6iVmrAPU8GJdwg)**   
  Use the Mobile Scripts table (\[sys_sg_mobile_scripts\]) to invoke specific records.

