---
title: "Table operations"
site: admin
version: 1.11
versions: "all"
url: https://docs-new.servicely.ai/admin/1.11/automation/table-operations/
type: reference
application: platform
last_updated: 2026-10-18
commit: 3ba12c8f0745
---


A table operation is a button or menu item that runs a script on one or more records, such as **Convert to request** on an incident. This page shows where operations appear and lists their fields, for administrators and developers with the `administrator` role.

Table operations are under **Administration → Business Logic → Table operations**. Each **Show in** field on the operation places it in one of the positions below.

## Where a table operation appears

### Detail view

A button at the bottom of a form, next to the save buttons. Examples are **Classify interaction** and **Set to resolved** on an interaction.

<Image src="asset:screenshots/admin/automation-table-operations/image.png" size="44">Table operation buttons at the bottom of an interaction form.</Image>

### Detail config menu

An item in the menu under the vertical ellipsis at the top right of a form. Examples are **Convert to request** and **Create related change** on an incident.

<Image src="asset:screenshots/admin/automation-table-operations/image-2.png" size="32">The form menu under the vertical ellipsis.</Image>

### Detail context menu

An item in the menu that opens when you right-click a field on a form. An example is **Edit available values** on a choice field, for administrators.

<Image src="asset:screenshots/admin/automation-table-operations/image-3.png" size="32">The field context menu on a form.</Image>

### Related list context menu

An item in the menu that opens when you right-click a record in a form's related list. Examples are **Approve on-behalf of** and **Reject on-behalf of** on the approvals list of an ITSM request, shown to users with the `approval_override` role. Set **Table** to the table the related list shows, here WorkflowTask.

<Image src="asset:screenshots/admin/automation-table-operations/image-4.png" size="60">The context menu on a record in the approvals related list.</Image>

### List view

A button at the bottom of a list. An example is **Import change set** on the change set list.

<Image src="asset:screenshots/admin/automation-table-operations/image-5.png" size="32">The Import change set button at the bottom of a list.</Image>

### List context menu

An item in the menu that opens when you right-click selected records in a list. An example is **Bulk cancel requests** on a list of ITSM requests.

<Image src="asset:screenshots/admin/automation-table-operations/image-6.png" size="44">The context menu on selected records in a list.</Image>

### List config menu

An item in the menu under the vertical ellipsis at the top right of a list. An example is **Personalise list**.

<Image src="asset:screenshots/admin/automation-table-operations/image-7.png" size="42">The list menu under the vertical ellipsis.</Image>

## Table operation fields

| Field | Type | Behaviour | Purpose |
| --- | --- | --- | --- |
| Name | Text | Required. | Identifies the operation, for example "Incident - Convert to request". |
| Label | Text | Translatable. | The text users see, for example "Convert to request". |
| Table | Table | Required. For a related list operation, the table the list shows. | The records the operation acts on. |
| Operation type | Choice | Required. Execute on server (default) or Execute on client. | Server to change records, client to navigate or change the page. |
| Is form submit | Yes or no | Default yes. Runs the form's On form submit UI events first. | Applies form checks before the operation. |
| Active | Yes or no | Default yes. | Shows or hides the operation. |
| Is bulk operation | Yes or no | Lists only. | Allows the operation on several selected records. |
| Icon | Icon | Optional. | Shown left of the label. |
| Order | Number | Default 100. | Orders operations in the same position. |
| Do not load full records | Yes or no | Lists only. | Leave on unless the Before or client script reads fields that are not on the list. Loading full records is slower. |
| Show in list view, Show in detail view and the other Show in fields | Yes or no | Show in detail view defaults to yes. | Places the operation. See the positions above. |
| Separator before, Separator after | Yes or no | Config menus only. | Draws a line before or after the item. |
| Roles | Roles | Optional. The user needs at least one of them. | Restricts who sees the operation. |
| Negate roles | Yes or no | Reverses **Roles**: users with none of them see it. | Hides an operation from a role. |
| Permission operations | List | read, create, update or delete. The user needs that permission on the table. | Ties the operation to table permissions. |
| Condition | Script | Decides whether the operation shows. Receives `current`, `viewAspect` and `tableName`. On the client also `formContext` and `formType`, and it must use `return`. | Shows the operation only where it applies. |
| Before | Script | Client. Runs first when the action runs on the client. Receives `current` and `viewAspect`. | Checks before the action runs. |
| Server script | Script | Shown for Execute on server. Runs after the condition and Before. Receives `current`. Set `answer` to pass data to On success. | The server action. |
| Client script | Script | Shown for Execute on client. Receives `current` and `Navigate`. | The browser action, such as opening a page. |
| On success | Script | Client. Runs when the action succeeds. Receives `response`, which holds the server script's `answer`. | Messages and navigation after success. |
| On failure | Script | Client. Runs when the action fails. | Error handling. |
| Renderer properties | Properties | Key and value pairs. | Changes how the button looks. See below. |

## Script examples

These scripts are an example of a convert-to-request operation on the Incident table.

Condition: show the operation on saved records outside the self-service view.

```javascript
(current.isNewRecord() === false && viewAspect != "SelfService");
```

Server script: save the incident, create the request through the reclassification field maps, and close the incident.

```javascript
// Save first so attachments and journal entries are copied
current.update();

var newRecId = ReclassificationUtil.reclassifyRecord(current, "Incident", "ITSMRequest");

current.ClosureNotes("Incident has been converted to Request: " + (Table("ITSMRequest").get(newRecId).Number()));

// Closed records are normally protected from updates
current.disablePermissionChecks();

Workflow.forceToActivity("Closed", current, true, true);

answer = [{
    id: newRecId
}];
```

On success: confirm and open the new request.

```javascript
DialogAPI.success("Record successfully created.  Taking you there now.");

Navigate.to({
    urlElements: ["ITSMRequest", response.id, viewAspect]
});
```

## Button position and colour

A detail view button can sit at the bottom right of the form, like **Cancel incident**. Add a renderer property with the key `button.type` and the value `right`. Use `alert right` to show it in red as well.

<Image src="asset:screenshots/admin/automation-table-operations/image-8.png" size="42">The renderer property button.type set to alert right.</Image>

## Related

- [Where scripts run](page:automation/scripting-overview)
- [Reclassification field maps](page:automation/reclassification-field-maps)
- [UI events](page:automation/ui-events)
- [Restrict which records a role can see](page:access/table-record-restrictions)
