Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2022-12-27 08:34 PM
I am working on the pop up message when a user selects an advanced workflow button. For example if the user selects “Approved”, a pop up message : “Please confirm.” appeared and required user to click ‘OK’ or ‘Cancel’ button. If user selects ‘OK’, then it will flow to the next workflow automatically.
I used select element to get the name of the AWF button and added it to the code (as below). The pop up message appeared when I select "Approved", but it won’t have any response after I select "Ok".
<script> var title = 'Submission confirmation', message = 'Please confirm';
function saveApply(action) { var userConfirmed = function(arg){ if(arg) { if(action == 'submit') { $("a:contains('Submit for Approval')").click(); } else if(action == 'approved') { $("a:contains('Approved')").click(); } else if(action == 'review') { $("a:contains('Submit for Risk Review')").click(); } } };
WarningConfirm(message, userConfirmed, title); }
Sys.Application.add_load(function() { $("a:contains('Submit for Approval')").unbind('click').prop("onclick", null).click(function(){ saveApply('submit'); return false;}); $("a:contains('Approved')").unbind('click').prop("onclick", null).click(function(){ saveApply('approved'); return false;}); $("a:contains('Submit for Risk Review')").unbind('click').prop("onclick", null).click(function(){ saveApply('review'); return false;}); }); </script> |
2022-12-28 03:15 AM
You are unbinding actions for your AWF buttons and then calling the same AWF buttons again after user confirmation. Also, I would not rely on just a:contains for selecting the button, but rather direct ID at least for testing purpose.
2024-09-04 03:39 PM
Was this worked for you? If so, can you please share some insights. Thanks in advance!