---
sourceDocument: Australia Mobile Configuration and Navigation
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/pt-BR/mobile

 Release :

    - australia

ft:locale :

    - pt-BR

ft:publication_title :

    - Australia Mobile Configuration and Navigation

ft:clusterId :

    - mobile

bundleId :

    - mobile

workflow :

    - Development, Data and Analytics


---

# Register records

# Register associated records in the offline cache {#ariaid-title1}

* Versão de lançamento: Australia
* 
* Atualizado 12 de mar. de 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 min. de leitura

Admins can configure offline mode to include associated records in the offline cache
when a user performs an action in online mode on their Mobile Agent.

## Antes de Iniciar

Role required: admin

## Por Que e Quando Desempenhar Esta Tarefa

When your ServiceNow instance has offline mode enabled, you can
configure their instance to include additional records in the offline cache. Then
these additional records are available when the end user is in offline mode.  
Importante:  
This feature is supported for scripted writeback actions only.

You must configure an action item before you can use the following steps to register
associated records in the offline cache. See [Configure action items and action steps in offline mode](https://servicenow-prod.fluidtopics.net/63G_k8heFc68OAPwruSctg "Configure action items to execute actions like create, edit and delete records while in offline mode. For an action item to perform multiple processes you must define separate action steps.") for information about configuring an
action item.

You must use scripting to configure this task, which requires using an API.

## Procedimento

1. Navigate to AllSystem MobileMobile App Builder.  
   The Mobile App Builder opens in a new browser tab and displays the application scope selection screen.
2. Search for the application scope you are working in and then select the name of the application scope.  
   The Mobile App Builder categories home screen displays.
3. Select All mobile records from the menu.
4. From the Record type field, select Action item \[sys_sg_write_back_action_item\], and then select the action item you created.
5. In the Type field, select Script.
6. In the Execution Script field, add the synchronization script.  
   For example, the following script automatically creates a work order task when a work order is created while the end user is online. Then the work order task is available to the end user when they are in the offline mode:

       (function WriteBackAction(input) {
           //Register additional record for offline mode
           actionResult.addRecordForSync("work-order-task","ef1a8b34df113100dca6a5f59bf26327")
       })(input);

   Where `"work-order-task"` is the table to be included in the document data section of the writeback response and `"ef1a8b34df113100dca6a5f59bf26327"` is the sys_id on the table.  
   Nota:  
   * This API can be called multiple times to register multiple records on different tables or on the same table.
   * To specify the record that you want to include in the offline database, use the table name (string) and the sys_id (string) of the record.
   * The record specified by sys_id and its associated fields appear in the document data section of the writeback response.
   * The record specified by sys_id is then synced with the offline database.
   * The data that you add with this API must be encapsulated in the refreshed document or in the destination document of the writeback response. To ensure that at least a refreshed or destination document is present in your writeback response, you can configure a destination screen on the button that invokes this API. When you configure a destination screen on the button that invokes this API, your data is guaranteed to be included in the destination document.
   {#register-assoc-records-offline-cache__ul_jsv_f45_nvb}
7. Select Save.

