openLocation()

Open the object’s location — the folder or register view that contains the object. 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

openLocation(options: OpenLocationOptions): Promise<void>;

2. Parameters

Name Type Description

inNewTab

boolean

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

objectId

string or number

The object id (osId).

objectTypeId

string or number (optional)

The object type id. Used by the rich client to derive the main type for dispatch (below); on the webclient it is a performance hint.

parentId

string or number (optional)

Disambiguates multi-location objects (webclient only; the bridge has no equivalent).

parentTypeId

string or number (optional)

The parent object type id (webclient only; the bridge has no equivalent).

3. Per-environment behavior

Environment Behavior

webclient

Posts openLocation with the five-slot plain-array params slot [inNewTab, objectId, objectTypeId, parentId, parentTypeId] (correlated — the host reply is awaited). Resolves undefined (void).

rich client

The main type is derived from the object type id as Number(objectTypeId) >>> 16 (0 = folder, 99 = register, otherwise document). Main type 0 (folder) opens the object itself via osjxOpenObject(objectId) (folders open as objects); every other main type — including a missing objectTypeId (documented best-effort) — opens the location via osjxOpenLocation(objectId). Resolves undefined. inNewTab, parentId, and parentTypeId have no bridge equivalent and are not sent.

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.openLocation({ inNewTab: false, objectId: '1024', objectTypeId: 262145 });

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.