Skip to main content
Version: 2026.0

project

Methods

getAlias

getAlias(pName, pKind): string

Returns the database alias of a data model.

Parameters

pName
string | number | boolean

The name of the data model.

pKind
number

The type of the data model. See project.DATAMODEL_KIND_*.

Returns

string

The alias you were searching for, or an empty String if the data model has no alias.

Throws

May throw an exception.

Example

var alias = project.getAliasInfo("ORG", project.DATAMODEL_KIND_FRAME);
question.showMessage(alias);

getAliasDefinitionStructure

getAliasDefinitionStructure(pAlias, pTable): any

Returns the structure of the alias definition, if one is available.

Parameters

pAlias
string | number | boolean

The name of the alias.

pTable
string | number | boolean

The name of a table; 'null' for all.

Returns

any

The structure of the alias.

Throws

May throw an exception.


Example

var structure = project.getAliasDefinitionStructure("AO_DATEN", null);



for ( var table in structure.tables )
{
if ( structure.tables[table].auditMode > 0)
{
var logColumns = [];
for ( var column in structure.tables[table].columns )
{
var colDef = structure.tables[table].columns[column];
if ( colDef.log || colDef.tableRef != null)
{
if ( colDef.keyword == null ) colDef.keyword = "";
if ( colDef.tableRef == null ) colDef.tableRef = "";
if ( colDef.autoMapTrueFalse4Log == null ) colDef.autoMapTrueFalse4Log = "";
if ( colDef.translate4Log == null ) colDef.translate4Log = "";
logColumns.push([column, colDef.title + "\t" + colDef.keyword + "\t" + colDef.tableRef + "\t" + colDef.autoMapTrueFalse4Log + '\t"' + colDef.translate4Log.replace('"', '""', "g") + '"']);
}
}
}
}

getAliasModel

getAliasModel(pName): Map<any, any>

Returns the details of an alias.

Parameters

pName
string | number | boolean

The name of the alias.

Returns

Map<any, any>

A map with the alias properties. The keys used are the constants project.ALIAS_*.

Throws

May throw an exception.

Example

var ai = project.getAliasModel("AO_DATEN");

var ret = "";
ret += ai[project.ALIAS_NAME] + "\n";
ret += ai[project.ALIAS_PROPERTIES]["databasetype"] + "\n";
ret += ai[project.ALIAS_PROPERTIES]["user"] + "\n";
ret += ai[project.ALIAS_PROPERTIES]["password"] + "\n";

question.showMessage(ret);

getAvailableLoginTypes

getAvailableLoginTypes(): any

Provides the configured logins. Uses the local context (neon, swing,...). All types are supplied, which are supported in principle in the environment of the code. No verification of the configuration itself is performed. var loginTypes = project.getAvailableLoginTypes();

Returns

any

The available login types.

Throws

May throw an exception.


getContextStructure

getContextStructure(pName): any

Returns information about a context

Parameters

pName
string | number | boolean

The name of the data model.

Returns

any

The structure of the context

Throws

May throw an exception.

Example

import("system.project");
var contextModel = project.getContextStructure("MyContext");
var contextName = contextModel.name;
var entity = contextModel.entity;
var views = [ contextModel.mainView, contextModel.filterView, contextModel.editView, contextModel.previewView, contextModel.lookupView ];

getDataModel

getDataModel(pKind, pName): string[]

Returns an array that contains the data model of the kind (type) and name you passed.

The individual entries are again array with the following elements:

Entry [0] = name

Entry [1] = title

Entry [2] = description

Entry [3] = comment (if present in the data model)

Entry [4] = metadata (if present in the data model)

Entry [5] = icon (if present in the data model)

Entry [6] = usePermissions (if present in the data model)

Parameters

pKind
number

The type of the data model. See project.DATAMODEL_KIND_*.

pName
string | number | boolean

The name of the data model.

Returns

string[]

Array containing an array with the properties of the data models: [[0] Name, [1] Title, [2] Description ] or 'null' if no data models with the passed kind exists.

Throws

May throw an exception.

Example

var dm = project.getDataModels(project.DATAMODEL_KIND_FRAME, "ORG");
question.showMessage(dm[0].join("\n"));

getDataModels

getDataModels(pKind, pNames?): string[][]

Returns an array that contains the data model of the kind (type) and name you passed.

The individual entries are again array with the following elements:

Entry [0] = name

Entry [1] = title

Entry [2] = description

Entry [3] = comment (if present in the data model)

Entry [4] = metadata (if present in the data model)

Entry [5] = icon (if present in the data model)

Entry [6] = usePermissions (if present in the data model)

Parameters

pKind
number

The type of the data model. See project.DATAMODEL_KIND_*.

pNames?
any

The names of the data models as array.

Returns

string[][]

Array containing an array with the properties of the data models: [[0] Name, [1] Title, [2] Description ] or 'null' if no data models with the passed kind exists.

Throws

May throw an exception.

Example

var dm = project.getDataModels(project.DATAMODEL_KIND_FRAME, ["ORG", "PERS"]);
question.showMessage(dm[0].join("\n"));

getEntityStructure

getEntityStructure(pName): any

Returns the structure information of an entity model

Parameters

pName
string | number | boolean

The name of the data model.

Returns

any

The structure of the entity model

Throws

May throw an exception.


Example

import("system.logging"); import("system.project")

var model = project.getEntityStructure("My_entity"); logging.log("Name: " + model.name); logging.log("Title: " + model.title); logging.log("Description: " + model.description); logging.log("UsePermissions: " + model.usePermissions); for (fieldName in model.fields) &#123; field = model.fields[fieldName]; logging.log(" Name: " + field.name); logging.log(" Type: " + field.fieldType); logging.log(" Title: " + field.title); logging.log(" Description: " + field.description); logging.log(" Maximum amount of characters (Text): " + new String(field.maxFieldSize == undefined ? "<unlimited>" : field.maxFieldSize)); logging.log(" Maximum amount of integer digits (Numbers):" + new String(field.maxIntegerDigits == undefined ? "<unlimited>" : field.maxIntegerDigits)); logging.log(" Maximum amount of fraction digits (Numbers): " + new String(field.maxFractionDigits == undefined ? "<unlimited>" : field.maxFractionDigits)); logging.log(" UsePermissions: " + field.usePermissions); &#125;

getInstanceConfigValue

getInstanceConfigValue(pName, pDefault?): string

Returns the value of an instance configuration.

Parameters

pName
string | number | boolean

Name of the property, you want to read. For custom properties the prefix "custom." is needed.

pDefault?
string | number | boolean

Returns

string

The value of the property as JSON

Example

var mailTo = project.getInstanceConfigValue("custom.ErrorMailTo");

getPreferenceValue

getPreferenceValue(pName, pDefault?): string

Returns a value of the project preferences

Parameters

pName
string | number | boolean

Name of the property, for custom properties the prefix "custom." is needed.

pDefault?
string | number | boolean

Returns

string

The value of the property as JSON

Example

var dsgvoActive = project.getPreferenceValue("custom.dsgvo.active");

If "mailBridgeMailserver" is passed in, then an array of active mailserver definitions are returned.

Please have also a look to property "mailBridgeActiveMailservers" in the InstanceConfiguration.

Example

import("system.project");
import("system.logging");

var mailBridgeMailserver = project.getPreferenceValue("mailBridgeMailserver");

var bridgeArray = JSON.parse(mailBridgeMailserver);

for (let i = 0; i &lt; bridgeArray.length; i++)
{
var bridge = bridgeArray[i];
logging.log(bridge.bridgeName);
logging.log(bridge.server);
logging.log(bridge.timeout);
logging.log(bridge.user);
logging.log(bridge.interval);

var filterArray = bridge.filter;
for (let j = 0; j &lt; filterArray.length; j++)
{
logging.log(filterArray[j]);
}

logging.log(bridge.searchFlag.bit);
logging.log(bridge.searchFlagValue);
logging.log(bridge.errorProcess);
logging.log(bridge.process);
logging.log(bridge.storeRepository);
logging.log(bridge.deleteFromServer);
logging.log(bridge.runProcess);
logging.log(bridge.useBlacklist);
logging.log(bridge.attachmentHandling);
logging.log(bridge.maxMailSize);
}
</code>

}

getRecordContainerModel

getRecordContainerModel(pEntityName, pProvider?): any

Returns the configuration of the recordContainer for the given entity name and provider. Depending on the recordContainer type, the object will contain different properties. Common properties are:

  • name

  • type

  • title

  • description

Additional properties for jDitoRecordContainers:

  • jDitoRecordAlias

  • isFilterable

  • isGroupable

  • isPageable

  • isRequireContainerFiltering

  • isSortable

  • recordFieldMappings

  • aggregateFieldMappings

Additional properties for dbRecordContainers:

  • isPageable

  • isReadOnly

  • isRequireContainerFiltering

  • alias

  • maximumDbRows

  • linkInformation

  • recordFieldMappings

Additional properties for IndexRecordContainers:

  • isActive

  • isGlobal

  • configMode

  • indexRecordAlias

  • indexFieldMappings

  • affectedTables

Additional properties for datalessRecordContainers:

  • alias

Parameters

pEntityName
string | number | boolean

The name of the entity

pProvider?
string | number | boolean

The name of the provider, optional

Returns

any

An object containing info about the recordContainer

Throws

May throw an exception.


getSystemTableAlias

getSystemTableAlias(pTableName): string

Returns the database alias a system table is located in.

Parameters

pTableName
string | number | boolean

The name of the system table.

Returns

string

The alias you were searching for, or an empty String if the data model has no alias.

Throws

May throw an exception.

Properties

Example

var alias = project.getSystemTableAlias("ASYS_BINARIES");
result.string(alias);

ALIAS_DATASOURCETYPE

string

When loading the alias model: contains the data source type of the alias.


ALIAS_NAME

string

When loading the alias model: contains the name of the alias.


ALIAS_PROPERTIES

string

When loading the alias model: contains the properties of the alias.


DATAMODEL_KIND_ALIAS

number

Data model: alias (definition)


DATAMODEL_KIND_ALIASCONFIGURATION

number

Data model: alias configuration


DATAMODEL_KIND_ALIASDEFINITION

number

Data model: alias definition


DATAMODEL_KIND_CONTEXT

number

Datenmodell: Context


DATAMODEL_KIND_ENTITY

number

Data model: frame


DATAMODEL_KIND_FRAME

number

Data model: frame


DATAMODEL_KIND_PROCESS

number

Data model: prozess


DATAMODEL_KIND_REPORT

number

Data model: report


DATASOURCE_CALDAV

number

Data source: CalDAV


DATASOURCE_DB

number

Data source: database


DATASOURCE_DOMINO

DATASOURCE_DOMINO: number

Data source: Ibm Lotus Domino

Deprecated

This API is deprecated.


DATASOURCE_EXCHANGEWS

number

Data source: Exchange Webservice


DATASOURCE_MAILREP_DB

number

Data source: mail repository database


DATASOURCE_MAILREP_IMAP

number

Data source: mail repository IMAP


DATASOURCE_MAILSERVER_IMAP

number

Data source: mail server IMAP


DATASOURCE_UNKNOWN

number

Data source: unknown


DATASOURCE_WORKFLOWSERVER

number

Data source: workflow server


DOMINO_REST

number

Datasource: Domino REST


ENTITYFIELDTYPE_ACTION

string

EntityField: ACTION


ENTITYFIELDTYPE_ACTIONGROUP

string

EntityField: ACTIONGROUP


ENTITYFIELDTYPE_CONSUMER

string

EntityField: CONSUMER


ENTITYFIELDTYPE_FIELD

string

EntityField: VALUE


ENTITYFIELDTYPE_FIELDGROUP

string

EntityField: FIELDGROUP


ENTITYFIELDTYPE_PARAMETER

string

EntityField: PARAMETER


ENTITYFIELDTYPE_PROVIDER

string

EntityField: PROVIDER


RECORDCONTAINERTYPE_DATALESS

string

RecordContainer type: DATALESS


RECORDCONTAINERTYPE_DB

string

RecordContainer type: DB


RECORDCONTAINERTYPE_INDEX

string

RecordContainer type: INDEX


RECORDCONTAINERTYPE_JDITO

string

RecordContainer type: JDITO