Skip to content

This guide is for builders who want people to act on a record in one click. By the end you will be able to add a button to an entity, decide what it does — run an automation, open a pre-filled form or another page, or run a short script — ask for confirmation first, limit which records it is available on, and show it in the views people use.

Tutorial · Part 5 of 7Ask the user for inputA button that asks for a value before it acts, and a comment a workflow action requires · 3:59 · Recorded on OSOS 1.11.0-alpha.1 · About this video

A button belongs to one entity and appears on that entity’s records, next to the buttons the platform provides (View, Edit, Create, Duplicate, Archive). You design it once on the entity’s Buttons tab, publish it, and then choose in each view whether it is shown.

Every button does one of three things, chosen in its Action:

ActionWhat happens when someone clicks itExample
A Custom Action (listed by name)Runs one of the entity’s custom actions — an automation you built on the Reactions tab. It can first ask the person for some input, and afterwards take them to another page.Close request: sets the status, records the closing date and emails the requester.
NavigationTakes the person somewhere: a list, a record, a create or edit form (optionally pre-filled), or a web address. Nothing is saved by the click itself.Create follow-up task: opens a new Task form already linked to this request and assigned to the person who clicked.
ScriptRuns a short script in the person’s browser.Show a calculated warning before someone continues.

A button’s Scope decides whether it works on one record (it appears on the record and on each row), on several selected records at once, or both.

Take a Service Request entity: a Close request button runs a custom action on one request or on a whole selection; a Create follow-up task button opens the Task form pre-filled from the request; both appear only on requests whose status is Open.

A button that runs automation needs a custom action first. On the entity’s Reactions tab, add a reaction with the Custom Action event and keep its Custom action level at UI action — only UI actions can be attached to a button. If the action needs input from the person clicking (a reason, a date), turn on Ask User For in the custom action. See Custom action type and Contextual.

Navigation and script buttons need no reaction.

  1. Open the entity: Administration › Applications › Data Entities, then select the entity. (You can also reach it from its module under Administration › Applications › Modules.)
  2. Select the Buttons tab, then New Button (or Add Button if the entity has none yet).
  3. Fill in the dialog:
    • Name — the label people see, in Arabic and English. It must be unique among this entity’s buttons.
    • Icon — the icon shown on the button.
    • Description — optional.
    • Action — under Custom Action, pick one of the entity’s UI custom actions; under UI Action, pick Navigation or Script. The sections below explain each.
    • Scope — Single Entry, Multiple Entries, or both.
  4. Select Save.
  5. Back on the Buttons tab, select Publish Button on the button and confirm. Until it is published, a button cannot be used.
  6. Show the button in a view — see Show the button in a view.

To change a button later, select it on the Buttons tab. Unpublish Button takes it out of use without deleting it; Delete Button removes it permanently.

  1. In Action, pick the custom action under Custom Action.
  2. Optionally open Customize Navigation For Single Entry to decide where the person goes afterwards. Set Navigation On Success and Navigation On Failure separately; for each, choose a Navigation Type (see the table in Open a form, a list or a link).

When someone clicks the button, the custom action runs on the record — or on every selected record — and a message tells them when it has finished. If the custom action asks for input, a dialog collects it first. The record’s history shows that the button was clicked.

  1. In Action, pick Navigation under UI Action.

  2. Choose the Navigation Type, then fill in what it asks for:

    Navigation TypeTakes the person toYou also choose
    Same ViewSomewhere in the current viewNavigation Action: Entries List, Create Entry, Show Entry Details or Update Entry
    RelationRecords linked to this one through a relationRelation, then a Navigation Action
    EntityA new record of another entityEntity; the Navigation Action is Create Entry
    Custom URLA web addressURL — it can contain variables, see below
  3. When the navigation opens a create or edit form, Advanced Options lets you pre-fill it — see Pre-fill the form.

The URL of a Navigation button can contain variables in double braces, such as https://example.com/profile?id={{userId}}&dept={{dept}}. Each variable appears under Custom Variables; for each one choose a Type, then what it maps to:

TypeThe variable becomes
FixedA value you type.
FieldThe value of a field on the record.
ExpressionThe result of an expression on the record.
PointerA date: @now, @today, @StartOfDay, @StartOfWeek, @StartOfMonth or @StartOfYear.

The variables are filled in at the moment of the click. If one cannot be filled — for example its field was deleted — the link opens without that value instead of showing an error, so test the link after you change the entity.

When a button opens a create or edit form, it can fill some fields for the person. Open Advanced Options and add rows under Fields Mapping. For each field, choose how its value is set:

Value typeThe field gets
FieldThe value of a field on the record the button was clicked on.
ManualA value you type.
Not SetNothing — the field is left empty.
PointerSomething about the person clicking, such as @me or their groups.
ExpressionThe result of an expression, for example a date three days from now.

Turn on Override locked value to lock the pre-filled fields so the person cannot change them in the form.

Example — Create follow-up task. On a Service Request, a Navigation button with Navigation Type Relation (the request’s Tasks) and Navigation Action Create Entry, mapping Related request = Field (this request), Assignee = Pointer (@me), Status = Manual (Open) and Due date = Expression (three days from now).

Keep expressions short and test them before you publish the button.

A script button runs a few lines of JavaScript in the person’s browser — useful for a check, a calculation or a message that no other option covers.

See also: Run JavaScript on forms and lists for the full context reference and recipes.

  1. In Action, pick Script under UI Action.
  2. Choose the Scope.
  3. Write the script in Script Code. The script receives the current entity, view and record; for a Multiple Entries button it receives every selected record.
  4. Save, then publish the button.

A script button runs in the browser only — it saves nothing on its own and does not appear in the record’s history. If you need the platform to change data, use a custom action instead.

Technical details

The script is called with one argument, context, which exposes entity, view, entry, entries and popupManager. For a multi-entry button, context.entries holds every selected row.

  1. Under Before Execution, turn on Show confirmation dialog before execution.
  2. Fill in Dialog title and Dialog content, and optionally the Proceed button label and Cancel button label.
  3. To show values from the record in the dialog — “Close request {{requestNumber}}?” — put variables in double braces in the title or content and map each one under Custom Variables, the same way as for a link (above).

Variables in the dialog are available only when the Scope is Single Entry alone. With Multiple Entries selected you can still show a dialog, but its text is fixed.

Limit which records the button is available on

Section titled “Limit which records the button is available on”

Under Filter, choose a saved query, or write conditions directly, or both (a record must then match both). Then choose what happens on records that do not match in For other entries:

  • Disable button — the button stays visible but cannot be clicked (the default).
  • Hide button — the button is not shown.

With several records selected, the button works only when every selected record matches. To learn how to write a query, see Queries.

A published button appears only in the views you add it to:

  1. Open the entity’s Views tab and open the view.
  2. In the view’s Buttons section, select the button. The list also holds the platform’s own buttons and the entity’s export templates; drag the rows to set the order.
  3. For each selected button you can set a Display name for this view, a Conditional display expression, and — for buttons that open another entity — the View to open it in.
  4. Save the view.

A button whose Scope is Single Entry needs the view’s entry details screen; a Multiple Entries button needs its entries list.

  • Only published buttons appear and run.
  • A custom action button can only run a UI action. If a button was attached to a local or external custom action — for example because that action’s level was changed later — clicking it is refused. Local and external custom actions are run by other reactions through Execute Custom Action, never by a click.
  • A custom action runs as the person who clicked unless the reaction says otherwise.
  • In preview mode the view shows its real buttons, but they cannot be run against the sample records.
ProblemWhat to check
The custom action is not in the Action listIt must be a Custom Action reaction on the same entity with Custom action level UI action, and it must be enabled and valid. There’s no custom events means the entity has none.
The button does not appear on a recordIs it published? Is it selected in this view’s Buttons section? Does the record match the Filter (with Hide button, it is hidden on non-matching records)?
The button is greyed outThe record — or one of the selected records — does not match the button’s Filter.
“You can’t execute this action on all selected entries”Some of the selected records do not match the filter. Narrow the selection.
The dialog shows {{…}} instead of a valueDialog variables work only with Single Entry scope, and each variable must be mapped under Custom Variables.
“The button name is unique on the entity level”Another button on this entity already has that name in one of the languages.

Platform 1.10.0 · Backend 1.11.0-alpha.11 · Frontend 1.11.0-alpha.6 · Mobile 1.10.2 · Chart 1.11.8 · Gateway 2.6.11 · MCP 0.2.0 · Grafana DS 1.2.0Docs build 2026-11-27