Reputation: 35
I am sorry for the silly question but I want to add a confirmation on an Apex button so that the dynamic action only triggers after the confirmation has been confirmed by the user. The dynamic action is PL/SQL code so that I cant use a Javascript condition which would start a function. So i tried using the alert/confirmation function but those dont stop the dynamic action from triggering. How can I solve that?
Upvotes: 1
Views: 1616
Reputation: 142705
If dynamic action runs some PL/SQL code, I presume that it can be moved into a process.
Anyway: suppose that button name is P1_BTN
code used would be
javascript:if(confirm('Are you sure?')){doSubmit('P1_BTN');}
when you run the page and push the button and answer "yes", P1_BTN
will submit and process related to it (according to process' Server side condition's "When button pressed" condition set to P1_BTN
) will run.
Upvotes: 2