DesiLogi Posted October 28, 2021 Report Share Posted October 28, 2021 Hi, I'm trying to use some 'After Submit' code in a tabular datapage's Bulk Edit footer to go to a new destination after submission. The code below runs an 'auto submit' in Bulk Edit as well, but I can't get it to go to a new page afterwards. Does anyone know how to format this code so that after Bulk Edit submits a new page is navigated to? <script> var bulkEditSubmit = document.querySelector('.SimpleButton.ActionButton[value=Update]'); console.log(bulkEditSubmit); document.addEventListener('FormSubmitted', function(event) { window.location = '../invoice?InvoiceID=[@field:InvoiceID]&ProjectID=[@field:ProjectID]&pti=i'; }); setTimeout( () => { bulkEditSubmit.click(); }, 1000); </script> Quote Link to comment Share on other sites More sharing options...
DesiLogi Posted October 29, 2021 Author Report Share Posted October 29, 2021 Solved: in case anyone needs help with this: Put this code in the footer of the Bulk Edit form (it also references a couple fields in the form for parameter values). Here's a previous post about this: <script type="text/javascript"> var v_invoice = document.getElementById("BulkEditInvoiceID").value; var v_project = document.getElementById("BulkEditProjectID").value; var v_url = "../invoice?InvoiceID=" + v_invoice + "&ProjectID=" + v_project; var updateBtn = document.querySelector('.ButtonsCtnr > .ActionButton'); updateBtn.onmouseup = redirectToDP; function redirectToDP() { var url = v_url; location.replace(url); } </script> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.