Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Open modal is no longer working – Dynamic HTML button in SQL + JS - ORDS

Elias ExnerApr 19 2025 — edited Apr 19 2025

Hi,

I was using a method (Dynamic HTML button in SQL + JS) to open modal pages, and it was working normally until April 17th.

Now, it’s redirecting to the default ORDS page.

This is happening on all app buttons that use the code below.


When I change the destination page to PAGE MODE = NORMAL, it opens normaly.

But, with PAGE MODE = MODAL, it redirects to ORDS default page

Ex: ….. _/landing#action$a-dialog-open?url=%2Fords%2Fr%2Fdigitask%2Fdigitask%2Fatividades-form%3Fp36_id_atividade%3D373%26clear%3D36%26session%3D110415562959456%26cs%3D3ZcAa3tWUNb1L_KG1frIfBuElZKlyEnVaeEMJ0K49sXzpZPQB6iY8El46qPm0klijbjDzFdNJXJz5pSt7BOdWXA%26dialogCs%3DWfafX7eVvCwoiTrAHcXMCLmHd-e4KzBmcMcfUm3sNdPVSOEU4UV_XYLBSteGZUpRvzlWaSx0p7YARUh-tsYK1g&appId=104&pageId=36&tmpl=DRAWER&title=Atividade&h=auto&w=720&mxw=960&isModal=true&dlgCls=&pageCls=%20js-dialog-class-t-Drawer--pullOutEnd&trgEl=this


CODE

1) I have a report with a button and sending the ID parameter

<button type="button"  
        class="t-Button t-Button--icon t-Button--tiny t-Button--confirm"  
        data-id="' || ativ.id\_atividade || '"  
       \*\*onclick="redirecionarPagina36('|| ativ.id\_atividade ||')"\*\*  
       title="Editar Atividade">                                  

2) I have a Global JS method

function redirecionarPagina36(idAtividade) {
apex.server.process("Redirecionar_Pagina36", {x01: idAtividade }, {
success: function(data) {
if (data.url) {
window.location.href = data.url;
} else {
console.error("Erro ao gerar URL.");
}
},
error: function(jqXHR, textStatus, errorThrown) {
console.error("Erro ao chamar o processo Redirecionar_Pagina36:", textStatus, errorThrown);
}
});
}

3) I have a AJAX callback method (in PROCESSING) to format the URL

Method NAME “Redirecionar_Pagina36”

DECLARE
l_url VARCHAR2(5000);
BEGIN
l_url := apex_page.get_url(
p_page => 36,
p_items => 'P36_ID_ATIVIDADE',
p_values => APEX_APPLICATION.g_x01,
p_clear_cache => '36'
);

apex_json.open_object;
apex_json.write('url', l_url);
apex_json.close_object;
END;

Thanks

Elias

This post has been answered by InoL on Apr 19 2025
Jump to Answer
Comments
Post Details
Added on Apr 19 2025
3 comments
104 views