Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

524 total results found

Sessions

Java API

For interacting with Tempus Serva records you need a session.You can create one like this: Session session = SessionFactory.getSession(this); // or, in a codeunit Session session = getSession(); All sessions need to be terminated after use (releasing DB co...

Constructing queries

Java API

First of create a query object SolutionQuery myQuery = session.getSolutionQuery( "mynewsolution" ); A query is built much like an SQL query by appending different fields to be SELECT'ed myQuery.addSelectField("MYNUMBER"); myQuery.addSelectField("MYOTHERNUM...

Retrieve data

Java API

Data are extracted from the query resultset using a relative reference to the record number for (int i = 0; i < rs.size(); i++) { String text = "Value nr " + i " = " + rs.getRecordValue(i, "MYVALUE"); System.out.println(text); } // or for (int i = 0;...

Change / create data

Java API

Needs Work

Code example

Java API

The following example shows how data is retrieved from af collection of templates and used to create a collection of records (with values copied from the template). String thisKeyToParentTemplate = "VALGTSKABELON"; // Entity String templateSolutionName = "ta...

Code placement

JavaScript functions

The following places can contain JS code Entity header Entity status JavaScript field Additionally HTML with inline script can be placed in Wrapper Template Finally expressions can be evaluated using Entity field dependency

Get and set values

JavaScript functions Builtin functions

Display values are handled using standard getter and setters getValue(fieldName) setValue(fieldName,value) Example let a = getValue("NUMBER1"); let b = getValue("NUMBER2"); setValue( "RESULT", (a-b) ); For explicitly getting a value (or ID) use g...

Toggling fields (5478+)

JavaScript functions Builtin functions

Note: Hide functions are NOT intended for denying access to data -it will only be hidden in the frontend, but is still accessible to savvy users. Fields can be shown or hidden calling the fieldname hideField(fieldName) showField(fieldName) Examples hi...

Toggling status

JavaScript functions Builtin functions

You can use a Jquery expression. $("#DATA_StatusID option[value='123']").remove();

Binding to events (6734+)

JavaScript functions Builtin functions

The platform sends out events when a couple of events are performed. Code can be written to bind to these. Events hide-field, triggered when the platform hides a field (dependency or hideField-function) show-field, triggered when the platform shows a fiel...

Value dependencies

JavaScript functions Builtin functions

Using lookup select boxes you can set up complex dependencies between values. The target field will be filtered when the page loads and on all changes to the filter field(s). Single dependency lookupValueFilterOnChange(fieldNameTarget, fieldNameSource, tripl...

Value triggers

JavaScript functions Builtin functions

Value triggers will make things happen when a field changes. Multiple triggers can be assigned to the same field. setValueOnChange(sourceName,targetName,targetValue) setValueOnSetValue(sourceName,sourceValue,targetName,targetValue) Sets the value if ano...

Value lookups

JavaScript functions Builtin functions

Value lookups will copy values from other records to the current one. The normal usecase is records referring other records via parent references. getValueFromLookup(SourceSagID,SourceDataID,FieldNameSource) setValueFromLookup(SourceSagID,SourceDataID,...

Named queries

JavaScript functions Builtin functions

You can add peprared statements configurations and make paramterized class to them lookupNamedQuery(query,value) The query must be stored under the name: "NamedQueryLookup" + query The value will be inserted into the ? parameter an escaped properly SE...

Inspect command and users

JavaScript functions Builtin functions

The currect command can be examined using isCommandNew() isCommandEdit() isCommandList() Note that commands are allways added as a class to the #TempusServaPage element <div id="TempusServaPage" class="TempusServaPage listCommand da_DK"> User types c...

Other functions

JavaScript functions Builtin functions

selectSingleOption(fieldName) Will set a value if only one option is avaiable in a select box. warnDateAfterOtherDate( dateA, dateZ, message ) Alerts the user via a popup, if two dates are not after each other. Both date changes triggers the test. disableE...

Control variables

JavaScript functions

TS uses a number of special variables to control the behavior of the frontend. These variables can be changed anywhere. Opening new windows Window default sizes are controlled by the following variables tsOpenWindowHeight = 680; tsOpenWindowWidth = 820; ...

Version 1 (XML)

REST interface

This article has not yet been fully converted to Wiki format. Please download the original article: Tempus Serva REST interface.pdf Netbeans quick start guide Steps to create a simple interaction Add Webservice to ide (wadl import) URL: [ServerName]/[...

Version 2 (Json)

REST interface

Download the swagger file from: https://<server>/<application>/rest/v2/swagger.json You can browse and try the api, using the built in SwaggerUI (from version 9147): https://<server>/<application>/rest/v2/swagger

URL structure

REST interface

When logged in the following URLs are available without further authentication Data list operations: GET, PUT, POST http(s)://<server>/<application>/rest/<version>/<entity> Data item operations: GET, PUT, POST, DELETE http(s)://<server>/<application>/res...