Hi ,
I am using APEX 19.1, DB 12
I have an AJAX call process on button Click
function saveDetails(pID, pColumnVal) {
var lSpinner$ = apex.util.showSpinner($("#regionStaticID"));
apex.server.process("SAVE_DETAILS", {
x01: pID,
x02: pColumnVal
}, {
//pageItems: ''
dataType: 'text'
}).done(function(pData) {
console.log("Calling DB OVer - " + pData);
lSpinner$.remove();
apex.region("regionStaticID").refresh();
});
}
SAVE_DETAILS Process is
BEGIN
myProc (apex_application.g_x01, apex_application.g_x02);
htp.p('OK');
END;
The process calls a DB procedure. The procedure is doing some calculations and it takes around 5-10 secs to complete.
But, the AJAX call is not waiting for process to complete even though I have Refresh Region part in .done.
The region is getting refreshed without the changes. The changes are saved correctly and when I refresh Page, I can see the changes done correctly.
How do fix this?
Please suggest.
Thanks,
Veerendra.