openDataSheet(objectId, readOnly)

openDataSheet(objectId, readOnly) opens the data sheet of an object read-only or editable. A direct bridge write on the rich-client handle from dashlet.getRichClientApi() (see getRichClientApi() for the full handle surface): the method calls the osjxOpenDataSheet member of the window.osClient bridge synchronously — without an options object and without normalization. The normalized, host-agnostic equivalent is the portable facade method openIndexData(options), which on the rich client maps to the same bridge call.

1. Signature

openDataSheet(objectId: number, readOnly: boolean): void;

2. Parameters

Name Type Description

objectId

number

The object id (osId).

readOnly

boolean

true = read-only, false = editable.

3. Behavior

  • Synchronous (the bridge is a synchronous COM/JS call): the method writes directly on the bridge and throws synchronously on failure — no promise, no host reply to await.

  • It invokes the bridge member osjxOpenDataSheet with the exact positional arguments [objectId, readOnly] (raw, no normalization).

  • It returns nothing (void); the bridge call has no return value.

  • Throw-safe: a missing bridge member (incl. a reduced OpenBrowser bridge surface at call time) throws the descriptive TypeError; a throwing bridge call throws the descriptive Error (see Errors).

  • The bridge is read per call (lazily): the handle reads window.osClient at call time, not a creation-time snapshot — a bridge state injected or swapped after handle creation is visible immediately.

  • Contrast: the portable facade openIndexData(options) does the same in the rich client — the same osjxOpenDataSheet call — with an options object and normalization (mode: 'view' → read-only, mode: 'edit' → editable).

4. Examples

rich.openDataSheet(1024, true);

5. Errors

  • Error('dashlet destroyed') — the dashlet was destroyed before the call (accessor and handle methods).

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

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

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

  • Error: Dashlet: rich-client bridge call "osjxOpenDataSheet" failed: … — the bridge call itself threw (the … carries the thrown detail).