When a button is clicked have to open a modal dialog which has Page Access Protection set as "Arguments Must Have Checksum"
On button click I have following DA.
apex.server.process("checksum",{x01:28440,x02:261,x03:1},{dataType:"text",success:function(pData){
apex.navigation.dialog(pData, {
height:'674',
width:'550',
maxWidth:'960',
modal:true,
dialog:null,
resizable:true,
minHeight:'500'
},
't-Dialog-page--standard',
$("body"));
}});
I'm generating URL using APEX_UTIL.PREPARE_URL through Ajax process
htp.p(apex_util.prepare_url('f?p='||apex_application.g_x01||':'||apex_application.g_x02||':'||:APP_SESSION||'::NO::P261_ID:'||apex_application.g_x03));
The window never opens. I get an error in console
However when window is opened using eval it works fine.
I also tried extracting the checksum and appending it to the url and then use apex.navigation.dialog as below
var url = 'f?p=28440:2681:&APP_SESSION.::NO::P2681_ID:1';
apex.server.process("checksum", { x01: 28440, x02: 2681, x03: 1 }, {
dataType: "text", success: function (pData) {
console.log(pData); //p_dialog_cs=oq5VvyL4Xw6lgHA6szuJNIEkxHtPxvtWLWNAG- yuntSw2ULjT04BDN65sNIN1o_rtRszjFylOiCEiOppQryhmw
apex.navigation.dialog(url + ",&" + pData, {
height: '674',
width: '550',
maxWidth: '960',
modal: true,
dialog: null,
resizable: true,
minHeight: '500'
},
't-Dialog-page--standard',
$("body"));
}
});
It gives below error in modal dialog
Any help is appreciated.