Important Update: Some Community URL Redirects are Under Maintenance. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Confirm Box not working for AWF button

MahendraSingh5
Contributor III

@DavidPetty @Ilya_Khen

We have a "Re-enrollment" button in the workflow for re-enrolling the record. We need to show a confirm box when that button is clicked.

If user clicks OK than workflow should run as usual else it should do nothing when Cancel is clicked.

Below is the code that I am using. It does not do anything when OK or Cancel buttons are clicked.It stays on the same window.

<script type="text/javascript">
document.getElementById("master_ondemand_21").onclick = function() {myFunction()}

function myFunction() {
confirm("Test Message");

}</script>

Please help in figuring out the code after the confirm box. Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

DavidPetty
Archer Employee
Archer Employee

Well, basically you're overriding the onclick function with your own function.  Remove you custom object from the layout and inspect the button element and see what functions are being called for the click and add those functions to your function and put the custom object back on the layout.

 Advisory Consultant

View solution in original post

3 REPLIES 3

DavidPetty
Archer Employee
Archer Employee

Well, basically you're overriding the onclick function with your own function.  Remove you custom object from the layout and inspect the button element and see what functions are being called for the click and add those functions to your function and put the custom object back on the layout.

 Advisory Consultant

Thanks David. In the onlick event it is calling javascript&colon;startWorkflow('Start_WF');return false;

Should i look for Start_WF in the document or something else?

Sorry I am new to this