openObject()

Open the object in its natural view (a document opens as a document, a folder opens as a folder). 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

openObject(objectId: string | number): Promise<boolean | undefined>;

2. Parameters

Name Type Description

objectId

string or number

The object id (osId) to open.

3. Per-environment behavior

Environment Behavior

webclient

The webclient has no openObject method — the call is implemented by posting openIndexData with [false, 'view', objectId] (opens the index data read-only). Resolves with the host’s boolean result.

rich client

osjxOpenObject(objectId) — a numeric object id. Resolves undefined.

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.openObject('1024');

The string-based equivalent (identical dispatch core) is dashlet.call('openObject', [1024]) — the positional array form carrying the single object id.

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. A plain object is also rejected: the facade takes the id itself, and call() takes [objectId] (an array), not a wrapper object.

  • 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.