openObject(objectId)

Opens the object in its natural view (a document opens as a document, a folder opens as a folder) on the rich client. One of the rich-client handle methods, obtained via getRichClientApi() — unlike the portable facade openObject, this is a direct, synchronous bridge write: no dispatch core, no validation, the raw number straight to the bridge.

1. Signature

openObject(objectId: number): void;

2. Parameters

Name Type Description

objectId

number

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

3. Behavior

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

  • Direct bridge write: the raw objectId number goes straight to the bridge member osjxOpenObject — unvalidated and unnormalized. Note: the facade openObject validates and normalizes the id (empty or non-numeric ids are rejected descriptively); the handle passes the raw number straight to the bridge.

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

4. Examples

rich.openObject(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 "osjxOpenObject" (bridge method missing) — the bridge member is missing (e.g. a reduced bridge at call time).

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