getRichClientApi()
dashlet.getRichClientApi() gives typed access to the full
osjx* bridge of the rich client. The handle is synchronous (the
bridge is a synchronous COM/JS call): every method returns its value or
throws synchronously. Both handle accessors (getRichClientApi /
getWebclientApi) are available per
environment and fail hard — a missing environment is never a silent
null fallback.
1. Signature
const rich: RichClientApi = dashlet.getRichClientApi();
The accessor is cached: every repeated call returns the same
instance (identity via ===). The handle methods read the bridge
per call (lazily) — a bridge state that is injected or swapped later
becomes visible immediately, not only after a new handle.
2. Methods
| Method | Bridge member | Behavior |
|---|---|---|
|
Raw slot read: the string value exactly as the bridge delivers it (no
trimming — the trailing space of the version in slot 10 is preserved), or
|
|
|
The raw selection string |
|
|
Opens the data sheet of |
|
|
Opens the object in its natural view. |
|
|
Opens the location (preview) of the object. |
|
|
Opens the result list; |
|
|
Refreshes the object in open hit lists. |
|
|
Raw read of the browser-environment object ( |
|
|
Sets the preview caption. |
|
— (live probe) |
|
|
any member |
The documented escape hatch: the raw, typed bridge passthrough for
uncataloged |
3. The getEnvironment(n) slot table
| Slot | Meaning | Note |
|---|---|---|
|
user name (userName) |
|
|
client version |
Raw value: the trailing space is preserved (trimmed/normalized only in
|
|
full name (fullName) |
|
|
||
|
user GUID |
|
|
language (GUI short code) |
|
|
session GUID |
|
other |
not documented |
The host marker "Unbekannter Parameter: N" is filtered — the method
yields |
null and '' are strictly distinct: null means "not readable"
(absent member, a throwing call, unknown slot), '' is a real empty
value. To tell apart whether the member itself is absent, use
rich.has('osjxGetEnvironment'); the facade
getSelectedObjects() delivers the
normalized selection shape.
4. call() — the documented escape hatch
rich.call('osjxGetEnvironment', [3]) invokes any osjx* member with
the argument array and returns the raw value (or undefined). A missing
member throws the descriptive TypeError (see Errors); a throwing
bridge call is converted into the descriptive Error. The cataloged
methods (table above) are the preferred path — call is the documented
fallback for uncataloged endpoints.
5. Reduced bridge and lazy reads
The detection semantics are unchanged: a reduced COM-OpenBrowser bridge
(only osjxGetBrowserEnvironment + osjxSetBrowserCaption, without the
dashlet marker member osjxGetSelectedObjects) is not a dashlet bridge
— the environment resolves to standalone, where the accessor throws the
wrong-environment error (see Errors). After a richClient resolution
(full bridge at detection time), the handle reads the bridge per call; if
only a reduced surface shows up at call time, that is reflected honestly:
reads yield null, write methods throw the descriptive TypeError,
has() returns false for the missing members, and the browser members
work.
6. v10.10 warm-up (raw reads)
On client version 10.10, osjxGetEnvironment(n) delivers empty values at
start until the warm-up is complete. The handle reads the bridge live — a
getEnvironment(…) call before the warm-up ends therefore yields ''
(the real empty value), and the value afterwards. The library itself runs
its own bounded warm-up with a refresh and re-emission of the context
(see environments — v10.10 warm-up).
7. 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 call happened before the environment was resolved. -
TypeError: Dashlet.getRichClientApi(): the rich client API handle is only available in the richClient environment (current: …)— call in the wrong environment (the current value is named). -
TypeError: Dashlet: the rich-client bridge does not expose "…" (bridge method missing)— write/callon a missing bridge member. -
Error: Dashlet: rich-client bridge call "…" failed: …— the bridge call itself threw.