1- Add the following function to Function and Global Variable Declaration
53 is the page number of the Apex modal dialog
P52_ITEM is one Page Item in the parent page
PREPARE_URL is the name for the callback procedure that must prepare the URL
3- Create a AJAX callback process with the following code
result:=apex_util.prepare_url(apex_application.g_x01); prepare the URL with all parameters.