loadRecord

Loads a record, based on the current config, from Gebra Suite server and returns a promise. This is a async function. You have to await the result, if you want to use it. This function will not display the record, it will just load and return it. To display the record, use the function result with displayRecord.

Parameters

The first parameter is a control with the key value, that will be used to find the record (like an address number)

Example Usages

Simple (pay attention to the await keyword)

let myRecord = await app.loadRecord("myKeyControl");

Return Values

The loadRecord function returns the result of fetching and processing a record based on the specified keyField. Before loading the record, it triggers the "RecordLoad" event, and if unsuccessful, it returns undefined. The final result is determined by the server-side processing of the "load" event and can be the loaded record data or null in case of errors or unsuccessful loading.

Last updated