---
sourceDocument: Brazil Field Service Management
sourceDocumentLink: https://www.servicenow.com/docs/r/field-service-management

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Field Service Management

ft:clusterId :

    - fsm

bundleId :

    - fsm

workflow :

    - Customer and Industry


---

# Customizing UI actions for the Now Mobile Agent app

# Customizing UI actions for the Now Mobile Agent application {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Customizing UI actions for the Now Mobile Agent application

ServiceNow's Now Mobile Agent application allows administrators to enhance user productivity by customizing UI actions specifically for the mobile environment.
These customizations differ from the desktop application as mobile UI action conditions do not execute database queries, reducing mobile resource consumption.
Instead of system checks, mobile UI actions are controlled by enabling or disabling buttons based on simplified conditions.
Show full answer Show less  

## Key Features

* **Mobile-specific UI action conditions:** UI actions for the mobile app use lightweight conditions that do not query the database, improving mobile performance.
* **Enable/Disable actions:** Administrators can activate or deactivate UI actions to optimize mobile resource use by disabling unused buttons.
* **Configuration in Studio:** UI actions for the Now Mobile Agent application are configured within ServiceNow Studio.
* **Adaptation of desktop conditions:** Desktop UI action conditions that rely on system checks (e.g., state flows, configuration helpers) must be simplified or removed for mobile. For example, database-dependent checks are replaced with straightforward field value comparisons.
* **Role-based and field-based checks:** Role validation is handled by adding roles to the mobile UI action's Roles field, while other conditions (like task assignment state) are checked with simplified scripts.

## Practical Configuration Examples

* **Accept Work Order Task:** On desktop, the Accept button uses complex state flow and configuration helper checks. On mobile, keep the state check (e.g., `current.state == 16`) but replace system checks with simpler conditions such as verifying the task is assigned to the logged-in user (`current.assignedto == gs.getUserID()`). If configuration settings disable accept/reject actions, disable the mobile UI action accordingly.
* **Assign to Me Function:** Desktop conditions include multiple system checks for task state, scheduled start time, self-assignment, user roles, and group membership. For mobile, validate only task assignment status, scheduled start time presence, and task state via a simplified script (e.g., `current.assignedto != gs.getUserID()` and task state checks). Role validation is done by assigning roles directly in the UI action's Roles field. Group membership validation is implemented in the write-back action script to ensure proper assignment or error messaging.

## Benefits for ServiceNow Customers

* Improves mobile app responsiveness by avoiding resource-intensive database queries in UI actions.
* Allows tailored user experiences on mobile by enabling only relevant UI actions based on task status and user roles.
* Simplifies administration by centralizing mobile UI action configurations in Studio and providing clear guidelines for adapting desktop logic.
* Ensures consistent and efficient task management workflows for field agents using the Now Mobile Agent application.  
Make it easier for your end users to get things done faster with the Field Service
mobile application by creating custom UI actions.

The configurations for UI action conditions are different in Field Service mobile applications than those in the desktop application. Unlike the desktop application, the UI action conditions on mobile don't execute any database
queries and therefore don't take up mobile resources. On the mobile application, instead of performing a system check on whether a Field Service configuration is enabled, you can configure the button to be active or inactive.

As an administrator, you can review the mobile UI actions and disable the ones that aren't being used to use less mobile resources.

The following image shows the Now Mobile Agent application open in Studio. The Now Mobile Agent application open in Studio is where you can configure UI actions.  
Here's a sample UI action configuration for accepting a work order task.  
The Accept button on the desktop application has the following UI action conditions:

    current.state == 16 && (new StateFlow().validFlow(current, '53d0aea8d7230100fceaa6859e610326', 'manual'));

The system checks these state flow conditions:

1. The `SMconfiguration` record to see if the accept_reject UI action is enabled or disabled using this script:

       (new global.SMConfigurationHelper()).isEnabled(current, "accept_reject", false)

2. If the task has been self-assigned
{#configure-uiaction-fsm-mobile__ol_lgj_dxh_2gb}  
To modify the UI action for the corresponding button on your mobile device:

1. Don't change the `current.state == 16` condition. It checks for information on the current record.
2. If this condition:

       (new global.SMConfigurationHelper()).isEnabled(current, "accept_reject", false)

   is set to false, drop this condition and disable the corresponding mobile UI actions on the mobile application.
3. Set the value for the current tasks assigned to field parameter to the logged-in user as shown here: `current.assigned_to == gs.getUserID()`

{#configure-uiaction-fsm-mobile__ol_grr_fxh_2gb}Based on the preceding example, here's the modified condition for the UI action in the mobile application:

    current.state == 16 && current.assigned_to == gs.getUserID()

Here's another sample configuration for self-assigning a task.  
The Assign to Me function on the desktop application has the following UI action conditions:

    (new SMTask()).canAssignToSelf(current)

The `SMTask.canAssignToSelf(task)` script include method performs a system check for these conditions:

1. State of the task
2. Value of the scheduled start time
3. If the task has been self-assigned
4. If the user has the basic and agent roles as defined in the SM Configuration record
5. Whether the user is part of a group handled by the task dispatch group
{#configure-uiaction-fsm-mobile__ol_ffw_scj_2gb}  
On the mobile application, the following UI script condition performs a check for the first three conditions listed before:

    current.assigned_to != gs.getUserID() && !(current.expected_start.nil()) && (current.state == 10 || current.state == 16) 

For the fourth condition, you can add a specific role to the Roles field.  
For the fifth condition, perform the following validation in the `wot_assign_to_me` write-back action item:

    if (smTask.canAssignToSelf(wotGR)) 
    smTask.assignToMe(gs.getUserID(), input.sys_id); 
    else
    gs.addErrorMessage(gs.getMessage("Not a valid task assignment."));


