openIndexData()

Open the index data of objectId read-only (mode: 'view') or editable (mode: 'edit'). One of the seven portable facade methods of the Dashlet handle — see call for the string-based surface, which shares the same dispatch core.

1. Signature

openIndexData(options: OpenIndexDataOptions): Promise<boolean | undefined>;

2. Parameters

Name Type Description

inNewTab

boolean

Open in a new tab (webclient; ignored by the rich-client bridge — it has no equivalent there).

mode

'view' or 'edit'

'view' = read-only, 'edit' = editable.

objectId

string or number

The object id (osId).

objectTypeId

string or number (optional)

The object type id. Improves performance on the webclient; not supported by the rich-client bridge (not sent there).

3. Per-environment behavior

Environment Behavior

webclient

Posts openIndexData with the plain-array params slot [inNewTab, mode, objectId, objectTypeId] (correlated — the host reply is awaited). Resolves with the host’s boolean result.

rich client

osjxOpenDataSheet(objectId, mode === 'view') — a numeric object id, and read-only exactly when mode === 'view'. inNewTab and objectTypeId have no bridge equivalent and are not sent. Resolves undefined (the bridge has no return value).

standalone (or still detecting without a wire)

No host reply path exists — the call rejects (bounded) with the TimeoutError so callers can render a fallback instead of hanging.

4. Examples

await dashlet.openIndexData({ inNewTab: false, mode: 'view', objectId: '1024' });

The string-based equivalent (identical dispatch core) is dashlet.call('openIndexData', [false, 'view', '1024']) — the positional array form of the same options.

5. Errors

  • TypeError — an invalid (missing/empty/non-numeric) objectId in the rich client: the id is coerced to the bridge’s numeric form, and empty or non-numeric ids are rejected descriptively instead of silently opening object 0.

  • Error('dashlet destroyed') — the dashlet was destroyed before the call.

  • TimeoutError — bounded no-reply in standalone, or a host that never answered within timeoutMs.

  • The host’s { error } payload — when the host reports a failure on the webclient method call.