cabrillo.nowapp - Client

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 9분
  • The name space for Cabrillo Now App functions. This enables you to interact with screens inside of ServiceNow AI Platform® native mobile apps.

    cabrillo.nowapp - openLauncherScreen(String launcherScreenId)

    Opens a mobile launcher native screen.

    표 1. Parameters
    Name Type Description
    launcherScreenId String Sys_id of the launcher screen from the Applet launcher [sys_sg_applet_launcher] table.
    표 2. Returns
    Type Description
    Boolean

    Flag that indicates whether the method is available on the native side.

    Valid values:
    • true: the method is available on the native side
    • false: the method is not available on the native side.
    const launcherScreenId = 'a9e30c7dc61122760116894de7bcc7bd'; 
    const result = cabrillo.nowapp.openLauncherScreen(launcherScreenId); 
    If (result === false) {  
        console.log("method is not available")  
    } 

    Output:

    true

    cabrillo.nowapp - openScreen(String screenId)

    Opens a mobile native screen.

    표 3. Parameters
    Name Type Description
    screenId String The sys_id of the screen record to open from the Screen [sys_sg_screen] table.
    표 4. Returns
    Type Description
    Boolean

    Flag that indicates whether the method is available on the native side.

    Valid values:
    • true: the method is available on the native side
    • false: the method is not available on the native side.
    const screenId = 'a9e30c7dc61122760116894de7bcc7bd'; 
    cabrillo.nowapp.openScreen(screenId); 
    If (result === false) {  
        console.log("method is not available")  
    }

    Output:

    true

    cabrillo.nowapp - openScreenWithRecordContext(String screenId, String table, String recordId)

    Opens a mobile native screen with a record context.

    표 5. Parameters
    Name Type Description
    ScreenId string Sys_id of the screen record to open from the Screen [sys_sg_screen] table.
    table string The record table.
    record string The record sys_id.
    표 6. Returns
    Type Description
    Boolean

    Flag that indicates whether the method is available on the native side.

    Valid values:
    • true: the method is available on the native side
    • false: the method is not available on the native side.
    const screenId = 'a9e30c7dc61122760116894de7bcc7bd'; 
    const recordId= '8e99daa3ff133100ba13757574847f2d'; 
    const table= 'sys_users'; 
    const result = cabrillo.nowapp.openScreenWithRecordContext(screenId, table, recordId); 
    If (result === false) {  
        console.log("method is not available")  
    } 

    Output:

    true

    cabrillo.nowapp - performFunction(String functionId, String table, String recordId)

    Executes a native mobile function.

    주:
    Only Action functions are supported for the Vancouver release. For more information, see Action functions.
    표 7. Parameters
    Name Type Description
    functionId string Sys_id of the target function from the Button [sys_sg_button] table.
    table string The record table. Optional for Global Action items. For more information about mobile function, see Action functions.
    주:
    Differences between Global and Record actions:
    • Record: Applies an action at the record level. For example, use this option to create a button that changes the state of a record. You can set the context to Record for actions on a particular field, a particular record, or swipe actions. If the action function includes a UI parameter with the Input source field set to Auto fill, you must specify the table in the Table field.
    • Global: Applies an action at the global, or list level. For example, use this option to add a button that creates a record. Do not use the Global setting for actions that are in the context of a record, or actions that include a UI parameter with the Input source field set to Auto fill.
    recordId string

    The record sys_id. Optional for Global Action Items. For more information about mobile function, see Action functions.

    주:
    Differences between Global and Record action items:
    • Record: Applies an action at the record level. For example, use this option to create a button that changes the state of a record. You can set the context to Record for actions on a particular field, a particular record, or swipe actions. If the action function includes a UI parameter with the Input source field set to Auto fill, you must specify the table in the Table field.
    • Global: Applies an action at the global, or list level. For example, use this option to add a button that creates a record. Do not use the Global setting for actions that are in the context of a record, or actions that include a UI parameter with the Input source field set to Auto fill.
    표 8. Returns
    Type Description
    Boolean

    Flag that indicates whether the method is available on the native side.

    Valid values:
    • true: the method is available on the native side
    • false: the method is not available on the native side.
    const functionId= 'a9e30c7dc61122760116894de7bcc7bd'; 
    const recordId= '8e99daa3ff133100ba13757574847f2d'; 
    const table= 'sys_users'; 
    const result = cabrillo.nowapp.performFunction(functionId, table, recordId); 
    If (result === false) {  
        console.log("method is not available")  
    } 

    Output:

    true

    cabrillo.nowapp - refresh()

    Refresh the UI stack in the event a table update is made in the web view that may affect a previous screen.

    표 9. Parameters
    Name Type Description
    None
    표 10. Returns
    Type Description
    Boolean

    Flag that indicates whether the method is available on the native side.

    Valid values:
    • true: the method is available on the native side
    • false: the method is not available on the native side.
    const result = cabrillo.nowapp.refresh(); 
    If (result === false) {  
        console.log("method is not available")  

    Output:

    true