Service Console

The Service Console runs short JavaScript commands on the server. It uses the same environment as template calculations, so you can use it to try out a function, check data in a dynamic table, or carry out a service intervention that is not possible elsewhere in the application. It is intended for experienced administrators and consultants who are familiar with TAS calculations. Open it from the Administration menu using the Service Console tile in the Application Management and Configuration group.

No.ElementPurpose
1HelpOpens the documentation of the functions the console can use.
2CloseReturns you to the Administration menu.
3return:Enabled by default. Automatically adds return in front of your command so that its result is displayed. For a multi-line command, clear the checkbox and write return yourself.
4EditorThis is where you write the command. The editor suggests the names of available functions.
5SendRuns the command on the server. Active only when the editor is not empty. After sending, the editor is cleared.

The result is displayed below the editor. A list is shown as a table, an object as formatted JSON. If the command ends with an error, the message There was an error while sending the request! is displayed, and you can find the details in Logs.

Commands run immediately and without confirmation
The console does not ask for anything. The command runs with your permissions and can change data, for example cases, dynamic tables or the user cache. The change cannot be reverted with an undo button. On a production installation, run only commands whose effect you know exactly, and test them in a test environment first.

Help

No.ElementPurpose
1SearchFinds a function by name or description, for example DMS or taskName.
2CategoryFilters functions by area, for example DynamicTable, Process, Users or Sys.
3FunctionsLink to the documentation of the lodash library, which can be used in calculations.
4ServicesLink to the TAS REST API documentation.
5CloseCloses the help.
6Function descriptionThe function name, its parameters, return value and a usage example with a copy button.

The console provides the libraries lib, dt (dynamic tables), identity, html, jwt, debug and sys, as well as the functions of installed plugins. Case and task variables (vars, proc, task) are not available in the console, because the command does not run within any case.

sys service functions

The sys library is available only in the console. Its functions include:

FunctionWhat it does
sys.pool()Status of the database connections.
sys.hg()Version and status of the backend and frontend.
sys.scheduledEvents()List of scheduled events.
sys.getCachedUser(id), sys.refreshCachedUser(id), sys.invalidateCachedUser(id)Loads, refreshes or deletes a user's data in the cache.
sys.flushCache('users' / 'tokens' / 'all')Clears part of the cache.
sys.setDTSequence(dtId, seq)Sets the row numbering of a dynamic table.
sys.rescheduleTaskDuration()Recalculates the deadlines of active tasks that have a duration set.
sys.archiveProcess(id), sys.unarchiveProcess(id)Archives a case or restores it from the archive.
sys.msGraphListFolders(…) and other msGraph… functionsWork with Microsoft 365 mailboxes when debugging e-mail import.

The complete list with parameters is in the help under the Sys category.

Who can see the console
The console can be opened by an administrator. The application does not keep a command history on the screen.

Related: Scripts, Logs, Service Operations.

Email Queue

AI monitoring

Syca (opens in a new tab)

Powered by HelpDocs (opens in a new tab)