Skip to main content
Question

Code Page - Redirect to Edit mode retains and redirects to code page on save

  • October 3, 2023
  • 0 replies
  • 168 views

I have a code page that creates a (copied) record, manipulates a bunch of relationships and at the end of the code opens in the new record in edit mode. The issue is when the user hits native save button it redirects back to the code page rather than the table home page or even the record in view mode (ideal). Unfortunately the redirect causes another copy of the record to be created in a wonderful loop. Have tried to use replace vs href when building the new URL and rdr but it behaves the same. Have other similar code pages but this is the first time I have run into the issue. Any help would be great.



------------------------------
Nathan Maubert
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+9
  • Quickbase Alumni
  • October 3, 2023

You can try and interact/play with the browser history using window.history.pushState but in my experience it's a little inconsistent and if a user keeps clicking back then they still might get back. My suggestion would be to actually modify the code page and before you do anything check to see if that record has already been processed like checking a box for 'copied' on the original record. Another option is to provide a submission screen where they user can cancel out to cancel (like a confirm/submit & cancel buttons page instead of having the code page automatically process).

\In the first example where you check to see if you should copy - you can instead just redirect them to the home page since they've already processed that entry. 



------------------------------
Chayce Duncan
------------------------------