Docs
section1 min read

Scripting reference

The objects and globals available to server and client scripts, one page per object, with each method's signature, result and an example.

This reference is for developers who write scripts in Servicely: triggers, UI events, script libraries, jobs, transforms and custom endpoints. Each page covers one object, lists its methods with the version they appeared in, and shows each script beside the result it returns.

Where a script runs and which globals it receives is explained in Where scripts run in the Administrator guide.

Start here

  1. Querying tablesHow to read records in server scripts: single lookups, simple and complex queries, iteration, empty results, batches and safe traversal.Developer
  2. TableMethods of the Table object, which queries a table, reads its schema and creates, counts and deletes its records in server scripts.Developer
  3. TableRecordMethods of the TableRecord object, which reads, sets, saves, clones and deletes one record in server scripts.Developer
  4. DateTimeConstructors, constants and methods of the DateTime object, which creates, compares, shifts and formats dates and times in server scripts.Developer
  5. HTTPMethods of HTTP, GetRequest, HttpRequestWithBody, HttpResponse and HttpResponseBinary for sending HTTP requests from server scripts.Developer

In this section

Querying tables

How to read records in server scripts: single lookups, simple and complex queries, iteration, empty results, batches and safe traversal.

Developer3 min

Scripting recipes

Server script recipes for attachments over HTTP and base64, and for testing a record against a condition stored on another record.

Developer2 min

Table

Methods of the Table object, which queries a table, reads its schema and creates, counts and deletes its records in server scripts.

Developer2 min

TableRecord

Methods of the TableRecord object, which reads, sets, saves, clones and deletes one record in server scripts.

Developer2 min

Field and Relation

Methods of the Field and Relation objects, which read a value's history and metadata and manage related records in server scripts.

Developer2 min

Query operators and criteria

The query operators that filter Table and Aggregate queries in server scripts, with their aliases and how to combine them.

Developer2 min

Questions

Methods of the Questions and QuestionResponse objects, which read the catalog questions and answers of a record in server scripts.

Developer2 min

TableProtected and TableChecks

TableProtected, the predefined TableChecks sets and the option methods that decide which permissions, validations, triggers and events a script applies.

Developer2 min

Aggregate

Methods of the Aggregate object, which counts, sums and groups table records in the database from server scripts.

Developer2 min

DateTime

Constructors, constants and methods of the DateTime object, which creates, compares, shifts and formats dates and times in server scripts.

Developer2 min

DateTime formatting and time zones

The pattern letters, style tokens, locales and time zone IDs that DateTime accepts when it formats, parses and converts dates in server scripts.

Developer2 min

Duration and Period

Constructors and methods of the Duration and Period objects, which measure and build lengths of time in server scripts.

Developer1 min

BigDecimal

Constructors and methods of BigDecimal for exact decimal arithmetic, and of Money for formatting amounts as currency, in server scripts.

Developer1 min

user and User

Methods of the server-side user object and the client-side User object, which read the signed-in user's details, roles, groups and properties.

Developer1 min

Client form API

Methods of current in client scripts, which read and set form fields, make them required, read-only or hidden, and show or hide layout elements.

Developer2 min

Workflow

Methods of the Workflow object, which performs and forces workflow transitions, moves records between activities and answers approvals from server scripts.

Developer1 min

Job

Methods of the Job object and of job requests, which run a server script in the background on a job queue.

Developer1 min

Logger

Methods of the Logger global and of the loggers it creates, which write leveled messages from server scripts and change log levels across the cluster.

Developer2 min

Journal

Methods of journal fields and journal entries, which read a record's journal history and add entries from server scripts.

Developer1 min

Translation

The functions that localise messages in scripts and components, and the Translation object that lists, generates, copies and deletes localised messages.

Developer2 min

ApplicationPropertyManager

Methods of ApplicationPropertyManager, which reads and creates application properties and returns the instance's base URL and ID in server scripts.

Developer1 min

RealmUtils

Methods of RealmUtils, which renumbers realms and re-stamps realm-separated records after the realm tree changes, in server scripts.

Developer1 min

HTTP

Methods of HTTP, GetRequest, HttpRequestWithBody, HttpResponse and HttpResponseBinary for sending HTTP requests from server scripts.

Developer2 min

AttachmentManager

AttachmentManager methods for moving, copying and validating attachments in server scripts, and the administrator methods for attachment storage.

Developer1 min

MarkupConverter and HtmlUtils

Convert between Markdown and HTML with MarkupConverter, and extract text from or edit HTML with HtmlUtils, in server scripts.

Developer1 min

Websocket

Websocket methods that send messages from a server script to signed-in users' browsers, for example to drive a progress dialog.

Developer2 min
Last updated 18 October 2026commit f37120b6b82bChris Jones
Back to top