The Problem
A modal dialog page opens fine but does not close after the user clicks Save, or it closes but the calling page does not refresh, or values set in the dialog do not appear on the parent page.
Issue 1: Dialog Not Closing After Submit
The dialog page must have a Branch that redirects back to the dialog page itself with a “Close Dialog” process, or use the “Close Dialog” process type. The most common fix: add a “Close Dialog” process in the After Processing section of the dialog page:
Process Type: Close Dialog. Items to Return: P20_ORDER_ID, P20_STATUS (items whose values you want to pass back to the parent). Condition: When Button Pressed = SAVE.
Issue 2: Parent Page Not Refreshing
When the dialog closes, APEX fires a “Dialog Closed” event on the parent page. You need a Dynamic Action on this event to refresh the relevant region:
Event: Dialog Closed. Selection Type: Region. Region: your report region. True Action: Refresh. This is frequently forgotten and is the most common reason the parent seems unresponsive after the dialog closes.
Issue 3: Return Items Not Available
Values specified in “Items to Return” on the Close Dialog process are available in the Dialog Closed DA through this.data in JavaScript:
// In the Dialog Closed DA's JavaScript action:
var returnedId = this.data.P20_ORDER_ID;
var returnedStatus = this.data.P20_STATUS;
apex.item("P10_LAST_EDITED").setValue(returnedId);
Issue 4: Dialog Opens as a Full Page
If the target page’s “Page Mode” is not set to “Modal Dialog,” it opens as a regular page instead of a dialog. Check the dialog page’s properties: Page Mode must be “Modal Dialog” or “Non-Modal Dialog.” Also ensure the link that opens it uses a standard APEX URL or redirect, not a hard-coded URL that bypasses APEX’s dialog detection.
Issue 5: Multiple Dialogs and Stacking
Opening a dialog from within a dialog can cause stacking issues. APEX supports chained dialogs, but each level must close properly. Ensure each dialog’s Close Dialog process fires in the correct sequence. Avoid going more than two levels deep as this creates a confusing user experience.