Advanced Search
Search Results
524 total results found
Sessions
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
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
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
Code example
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
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
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+)
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
You can use a Jquery expression. $("#DATA_StatusID option[value='123']").remove();
Binding to events (6734+)
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
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
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
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
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
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
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
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)
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)
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
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...