This file contains custom functions specific to the Rosetta language
Methods
(inner) context(ctxopt) → {string}
Gets the current API context (if ctx param is null or not supplied) or Sets the API context to either database for local DOM, for those APIs that require working with differents contexts such as GetField/SetField Note: this API is not derived from an existing Lotus Notes Formula function. Instead, it is needed to set the acting context for the GetField and SetField functions.
Name | Type | Attributes | Description |
---|---|---|---|
ctx | string | <optional> | the context to set: 'db', 'local', or 'all' (default for any other string supplied) |
the context
- Type:
- string
(inner) debug(msg, type) → {Object|undefined}
Uses the console object's methods to display Debug messages, prepending them with a timestamp. Defaults to console.log() if * no type of logger is supplied. Note: this API is not derived from an existing Lotus Notes Formula function
Name | Type | Description |
---|---|---|
msg | string | message |
type | string | logger to employ: 'Error', 'Warning', 'Info', 'Debug', 'Log' from the console object, or javascript alert if type is Alert |
Object representing the debug message
- Type:
- Object
undefined if no logger is available
- Type:
- undefined
(inner) restfulAPI(url, method, headers, body, additionalRequestParams) → {Promise.<any>}
Function to call a restful API.
Name | Type | Default | Description |
---|---|---|---|
url | string | The URL of the REST service. | |
method | string | The HTTP method (GET, POST, PUT, DELETE, etc.). | |
headers | string | Optional headers to include in the request as a JSON string. | |
body | string | null | Optional body for POST, PUT, or PATCH requests as a JSON string. |
additionalRequestParams | string | null | Optional additional request parameters as a JSON string. |
- A promise that resolves to the response data or rejects with an error.
- Type:
- Promise.<any>