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!

APEX 24.2 – Error Opening Modal Dialog from Custom Interactive Grid Toolbar Button

Inês Tomé14 hours ago

Hi,

I'm trying to open a modal dialog (page 200) from a custom button in an Interactive Grid toolbar using JavaScript Initialization Code. Despite page 200 being properly configured as a modal dialog, I keep getting this error:

This is the Interactive Grid JavaScript Initialization Code:

function(config) {
var $ = apex.jQuery;
var toolbarData = $.apex.interactiveGrid.copyDefaultToolbar();
var toolbarGroup = toolbarData.toolbarFind("actions3");

let restoreLabel = "Fornecedor ausente da lista? Clique aqui.";

toolbarGroup.controls.push({
type: "BUTTON",
action: "cust-redirect-page",
label: restoreLabel,
iconBeforeLabel: true,
icon: "fa fa-plus",
hot: true
});

config.initActions = function(actions) {
actions.add({
name: "cust-redirect-page",
action: function() {
var url = "f?p=" + apex.env.APP_ID + ":200:" + apex.env.APP_SESSION + ":::::";
apex.navigation.dialog(url, {
title: "Adicionar Fornecedor",
height: "auto",
width: "600"
}, "a");
}
});
};

config.toolbarData = toolbarData;
return config;
}

Questions:

  1. Is there something different required when opening modals from IG toolbar actions?
  2. Are there additional configuration steps needed for the Modal Dialog template when called programmatically from IG?

Any insights would be greatly appreciated!

Thanks.

Comments
Post Details
Added 14 hours ago
1 comment
28 views