I would like to submit the page when I click a button, there are a couple validations I want to do first and I don't want to use the built in one for it so I'm creating one using javascript dynamic action. Most of it works just fine, just the submit page doesn't execute. Using this documentation.
.2/aexjs/apex.page.html
My code is essentially
if (...){
//some things i want to run first
apex.submit('submit');
alert("aaaa")
}else{
...
}
Everything but the submit as well as the code after submit works just fine. Not too sure what's wrong with it.
I would like to submit the page when I click a button, there are a couple validations I want to do first and I don't want to use the built in one for it so I'm creating one using javascript dynamic action. Most of it works just fine, just the submit page doesn't execute. Using this documentation.
https://docs.oracle./en/database/oracle/application-express/20.2/aexjs/apex.page.html
My code is essentially
if (...){
//some things i want to run first
apex.submit('submit');
alert("aaaa")
}else{
...
}
Everything but the submit as well as the code after submit works just fine. Not too sure what's wrong with it.
Share
Improve this question
asked Jan 7, 2022 at 18:16
J.HJ.H
11 gold badge1 silver badge3 bronze badges
2
-
Works perfectly for me. Just created DA on a button with only
apex.submit('submit');
as code and page submits fine. – Koen Lostrie Commented Jan 8, 2022 at 12:19 - The other thing you could do is apply those "some things" in the client side condition of a Dynamic Action, where the true action includes a declarative Submit action, and the the false actions are your 'else' – Scott Commented Jan 10, 2022 at 0:03
2 Answers
Reset to default 0Are your page processes are executed when page is submitted with the request 'submit'? Also you can try the console of your browser and just execute apex.submit() without any request specified to see if the page is submitted or not.
make any process to execute needed actions
in server side condition area // type => request = value // value => requestName //
then go to your JS code (dynamic action ) and then add this
apex.submit('requestName');