Skip to main content

6 docs tagged with "fluent-language"

View all tags

$override — Setting Properties Not Modeled by the API

$override is an escape hatch on Fluent API constructors. Use it to set fields that the typed API does not expose — typically customer-added columns (x/u prefixed), fields added by another application, or out-of-the-box columns that simply aren't in the API surface yet.

Data Helpers

Fluent provides global helper functions for creating typed values in Record() data fields. These functions are available globally — no import needed.

Now.attach

Now.attach() attaches an image file to a record at build time. It reads the file, compresses it, and creates the corresponding sysattachment and sysattachment_doc records in the XML output.

Now.include

Now.include() populates a record field with the contents of a file at build time. It reads the file and inlines its text into the XML output, keeping source files separate for IDE support (syntax highlighting, IntelliSense, linting).

Now.ref

Now.ref() creates a reference to a record in another table. Use it when a field needs to point to a record that isn't defined in the current file — for example, referencing a role, a flow, or any record identified by its sys_id or coalesce keys.

ServiceNow Fluent Overview

ServiceNow Fluent is a domain-specific language (DSL) based on TypeScript for defining the metadata files [sys_metadata] that make up applications. It includes APIs for tables, roles, ACLs, business rules, Automated Test Framework tests, and more.