openLocation(objectId)

Opens the object’s location (the folder or register view that contains the object) on the rich client. One of the rich-client handle methods, obtained via getRichClientApi() — unlike the portable facade openLocation, this is a direct, synchronous bridge write: no dispatch core, no main-type logic, the raw number straight to the bridge.

1. Signature

openLocation(objectId: number): void;

2. Parameters

Name Type Description

objectId

number

The object id (osid) of the location to open — passed unmodified to the bridge.

3. Behavior

  • Synchronous: the bridge is a synchronous COM/JS call — openLocation(objectId) invokes osjxOpenLocation(objectId) immediately and returns void; there is no promise to await.

  • Direct bridge write: the raw objectId number goes straight to the bridge member osjxOpenLocation — unvalidated and unnormalized.

  • Throw-safe: a missing bridge member (incl. a reduced bridge at call time) throws the descriptive TypeError; a bridge call that throws is converted into the descriptive Error — never an uncaught host-proxy throw, on any client version (see Errors).

  • Lazy per-call read: the handle reads window.osClient per call (no creation-time snapshot) — a bridge state that is injected or swapped later is reflected immediately.

  • Contrast to the facade: the facade openLocation applies the documented main-type best-effort in the rich client (main type 0 = folder opens the object via osjxOpenObject; everything else — including a missing objectTypeId — via osjxOpenLocation); the handle calls osjxOpenLocation directly — no main-type logic, regardless of the object type.

4. Examples

rich.openLocation(1024);

5. Errors

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

  • TypeError: Dashlet.getRichClientApi(): the environment is not resolved yet - await the dashlet.init promise first — the handle was requested before the environment was resolved (accessor error).

  • TypeError: Dashlet.getRichClientApi(): the rich client API handle is only available in the richClient environment (current: …) — the handle was requested in the wrong environment (accessor error; the current value is named).

  • TypeError: Dashlet: the rich-client bridge does not expose "osjxOpenLocation" (bridge method missing) — the bridge member is missing (e.g. a reduced bridge at call time).

  • Error: Dashlet: rich-client bridge call "osjxOpenLocation" failed: … — the bridge call itself threw (the detail names the bridge error).