ctx.openView()
Programmatically open a specified view (drawer, dialog, embedded page, etc.). Provided by FlowModelContext, it is used to open configured ChildPage or PopupAction views in scenarios such as JSBlock, table cells, and workflows.
Use Cases
Note:
ctx.openViewis available in a RunJS environment where aFlowModelcontext exists. If the model corresponding to theuiddoes not exist, aPopupActionModelwill be automatically created and persisted.
Signature
Parameters
uid
The unique identifier of the view model. If it does not exist, it will be automatically created and saved. It is recommended to use a stable UID, such as ${ctx.model.uid}-detail, so that the configuration can be reused when opening the same dialog multiple times.
Common options Fields
Examples
Basic Usage: Open a Drawer
Passing Current Row Context
Open via runAction
When a model is configured with an openView action (such as association fields or clickable fields), you can call:
Injecting Custom Context
Relationship with ctx.viewer and ctx.view
ctx.openView opens a FlowPage (ChildPageModel), which renders a complete flow page internally; ctx.viewer opens arbitrary React content.
Notes
- It is recommended to associate the
uidwithctx.model.uid(e.g.,${ctx.model.uid}-xxx) to avoid conflicts between multiple blocks. - When
definePropertiesordefineMethodsare passed,navigationis forced tofalseto prevent context loss after a refresh. - Inside the dialog,
ctx.viewrefers to the current view instance, andctx.view.inputArgscan be used to read the parameters passed during opening.

