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!

Run multiple processes only after one completes - apex.server.process

Gor_MahiaJan 30 2022 — edited Jan 30 2022

Hi,
i thought its straight forward but the below doesn't work - I want to run the below functions synchronously i.e. only after lvJOB1 part completes then run lvJOB2.

var lvJOB1 = function() {
apex.server.process('procTASK',
{},
{dataType: "text",
success: function(lvURL){
apex.navigation.redirect(lvURL);
}
});
};

var lvJOB2 = function() {
$('.refreshREG').trigger('apexrefresh');
document.getElementById("lineChart").scrollIntoView({behavior: 'smooth'}); } ;

...then executes as below
lvJOB1()
.then(function(data) {
return lvJOB2();
}, displayError) ;

but this downt work, what am i missing error?
thanks.

This post has been answered by Scott Wesley on Jan 30 2022
Jump to Answer
Comments
Post Details
Added on Jan 30 2022
2 comments
524 views