uc-apx create dynamic-action refresh-on-dialog-close
Splice a dynamicAction ... when { event: apexafterclosedialog }
into a parent page so a target region refreshes after a modal dialog
opened from this page is closed (typical pattern: edit row in modal,
close, parent IR/IG/CR refreshes).
Pick exactly one trigger: —trigger-button @<id> — fire only when the modal was opened by this button (selectionType: button). Use this for explicit “open dialog” buttons (e.g. “Add Row”). —trigger-region @<id> — fire when ANY modal opened from this region closes (selectionType: region). Use this for IR/CR row-level link columns (“Edit” pencil) where multiple rows can each open a modal.
—refresh-region @<id> selects the region to refresh after close. This is usually the same region you pass to —trigger-region.
uc-apx create dynamic-action refresh-on-dialog-close [flags]| Flag | Type | Default | Description |
|---|---|---|---|
--dry-run | Print rendered dynamicAction to stdout without writing | ||
--id | string | Override the construct id (default: refresh-<trigger>-on-close) | |
--name | string | Display name (default: “Refresh on Dialog Close (<trigger>)“) | |
--page | string | Target page (numeric ID, alias, or name) [required] | |
--refresh-region | string | Region id to refresh after close [required] | |
--sequence | int | execution.sequence (default: max existing dynamicAction sequence + 10) | |
--trigger-button | string | Trigger button id (selectionType: button); one of —trigger-button or —trigger-region required | |
--trigger-region | string | Trigger region id (selectionType: region); one of —trigger-button or —trigger-region required |
Global Flags
Section titled “Global Flags”| Flag | Type | Default | Description |
|---|---|---|---|
--app-dir | string | . | Path to the APEX application directory |
--json-pretty | Output in pretty-printed JSON (human-readable) instead of minified JSON | ||
--toon | Output in TOON format (human-readable, token-efficient) instead of JSON |
Example Generated APEXlang
Section titled “Example Generated APEXlang”Using --dry-run to preview the generated construct (no files are written):
uc-apx --app-dir examples/brookstrut create dynamic-action refresh-on-dialog-close --page 46 --refresh-region @sales-history --trigger-button @reset --dry-runGenerated APEXlang
dynamicAction refresh-reset-on-close ( name: Refresh on Dialog Close (reset) execution { sequence: 20 } when { event: apexafterclosedialog selectionType: button button: @reset }
action native-refresh ( action: refresh affectedElements { selectionType: region region: @sales-history } execution { sequence: 10 fireOnInit: false } )
)