Event handler generation

  • Release version: Australia
  • Updated June 11, 2026
  • 3 minutes to read
  • Summarize
    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 Event handler generation

    Now Assist event handler generation in UI Builder simplifies configuring event handlers for UI components through natural language input. Instead of manually setting routing parameters and binding expressions, developers describe desired behaviors in plain language. Now Assist interprets these prompts, identifies destination pages or URLs, maps parameters, and generates complete event handler configurations for review and application.

    Show full answer Show less

    Key Features

    • Natural language input: Replaces manual form-filling, speeding up event handler setup.
    • Automatic parameter binding: Dynamically binds page parameters from state or event payloads, enabling context-aware navigation without manual coding.
    • Contextual sample prompts: Offers relevant examples based on current pages and components to help users start quickly.
    • Human review before applying: Displays a read-only preview of generated configurations for users to accept, edit, or reject, ensuring accuracy.
    • Supports common event handlers: Includes Open page or URL, Open and close modal dialog, and Viewport load requested handlers, all configurable via natural language.

    How It Works

    When adding an event handler in UI Builder, users describe the desired behavior in the Now Assist panel or select a sample prompt. Now Assist analyzes the prompt against available pages, parameters, and event payloads to generate a configuration preview. After user review, the configuration can be accepted and edited or rejected and re-prompted. Final settings are saved through standard form controls.

    Practical Implications for ServiceNow Customers

    This feature significantly reduces the complexity and time required to configure event handlers, especially for developers new to the platform. It eliminates the need to understand complex routing and binding syntax, enabling faster, more accurate setup of user interactions like navigation and modal dialogs. Dynamic parameter binding from event payloads ensures event handlers respond contextually to user actions without manual intervention.

    Now Assist event handler generation enables you to configure event handlers for UI components using natural language, eliminating the need for manual configuration of complex routing parameters and binding expressions.

    In UI Builder, event handlers define how a component responds to user interactions, such as a button select or a reference link selection. Configuring these handlers manually requires knowledge of specific parameters, page routing structures, and binding syntax — all of which can be time-consuming and error-prone, particularly for developers who are new to the platform.

    With Now Assist event handler generation, you describe the desired behavior in plain language. Now Assist interprets the prompt, identifies the correct destination page or URL, maps any required parameters, and generates a complete configuration. You review the result before applying it, and you can edit any field using the standard form controls before saving.

    Benefits

    Now Assist event handler generation provides the following benefits:

    Faster configuration
    Natural language input replaces manual form-filling, significantly reducing the time needed to set up event handlers.
    Reduced complexity
    Now Assist interprets intent and populates routing parameters, destination pages, and bindings automatically.
    Intelligent parameter binding
    Now Assist can bind page parameters dynamically from state parameters or event payloads, enabling context-aware navigation without manual binding expressions.
    Contextual sample prompts
    The Now Assist panel displays relevant sample prompts based on the pages and components available in the current experience, so you can start quickly without composing a prompt from scratch.
    Human review before applying
    Generated configurations are presented as a read-only preview before being committed. Developers can accept and edit, or reject and re-prompt, ensuring accuracy at every step.

    How Now Assist generates event handler configurations

    When you add an event handler to a component in UI Builder and open the Now Assist configuration panel, the system presents a text field where you describe the behavior you want. You can enter your own prompt or select from the sample prompts displayed.

    Now Assist processes the prompt against the available pages, parameters, and event payloads in the current experience and generates a configuration. The result is displayed as a read-only preview. You review the destination, parameter bindings, and trigger settings, then choose to accept and edit, or reject the result.

    If you accept, the configuration is applied to the component. You can continue editing individual fields using the standard form controls before selecting Add to save the handler.

    Supported event handlers

    Now Assist event handler generation supports the three most commonly used event handlers in UI Builder:

    Open page or URL

    The Open page or URL event handler navigates the user to a page when a component event triggers. The destination can be a page within the current experience or an external URL.

    For pages in the current experience, you select the target page and provide any required parameters, such as a table name or sys_id. For external URLs, you enter the full URL. Both destination types support an Open in new tab option.

    Parameters can be bound statically or dynamically from state parameters or event payload fields. Advanced mode exposes additional binding fields for route, fields, and params.

    Open and close modal dialog

    The Open and close modal dialog event handler opens or closes a modal dialog in the current experience when a component event triggers. Now Assist can configure this handler based on a natural language description of which dialog to open or close and under what conditions.

    Viewport load requested

    The Viewport load requested event handler triggers the loading of a specific viewport within the experience when a specified event triggers. Now Assist can configure this handler based on a natural language description of the target viewport and the triggering event.

    Event payloads and parameter binding

    Some component events dispatch a payload — a set of data values emitted by the source component when the event triggers. When a payload is available, Now Assist can bind destination parameters directly to payload fields, enabling fully dynamic navigation without any static values.

    For example, the Reference link clicked event on a list component dispatches the following payload fields: listTable, nativeEvent, record_id, row, sys_id, and table. Now Assist can map these fields to the corresponding parameters of a record page destination automatically, so that selecting any reference link in the list opens the correct record.

    When an event has no payload — such as the Button clicked event — parameters must be bound from state parameters or entered as static values.