Skip to content

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]
FlagTypeDefaultDescription
--dry-runPrint rendered dynamicAction to stdout without writing
--idstringOverride the construct id (default: refresh-<trigger>-on-close)
--namestringDisplay name (default: “Refresh on Dialog Close (<trigger>)“)
--pagestringTarget page (numeric ID, alias, or name) [required]
--refresh-regionstringRegion id to refresh after close [required]
--sequenceintexecution.sequence (default: max existing dynamicAction sequence + 10)
--trigger-buttonstringTrigger button id (selectionType: button); one of —trigger-button or —trigger-region required
--trigger-regionstringTrigger region id (selectionType: region); one of —trigger-button or —trigger-region required
FlagTypeDefaultDescription
--app-dirstring.Path to the APEX application directory
--json-prettyOutput in pretty-printed JSON (human-readable) instead of minified JSON
--toonOutput in TOON format (human-readable, token-efficient) instead of JSON

Using --dry-run to preview the generated construct (no files are written):

Terminal window
uc-apx --app-dir examples/brookstrut create dynamic-action refresh-on-dialog-close --page 46 --refresh-region @sales-history --trigger-button @reset --dry-run
Generated 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
}
)
)