How can I make a save button that returns user back to edit mode even when creating a new record

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
  • (Edited)
I have a really long form I added save buttons at intervals using formula url fields the code is 

"<a class='Vibrant Success' onclick=$('#RedirectURL').val(document.location.href.replace(/&rl=[a-z0-9]*/,''));$('[name=rl]').val('');$('#saveButton').trigger('click'); href='#'; style='font-size:125%' >Save & Close Tab</a>".

This works great when editing old records but not for new records. Is there a way to have new records open back up to edit mode as well. I have seen some posts on this but none of them were clear thanks
Photo of zvi bock

zvi bock

  • 200 Points 100 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
The tough part here is you can have a redirect to edit mode, when there is no record ID# yet... you could make a workaround, that would find the largest RID in the table, and then add 1 to the redirect formula, but that is still tricky, and can depend on how fast the RID is generated in QB.
Photo of zvi bock

zvi bock

  • 200 Points 100 badge 2x thumb
Thanks for your help I will try your solution and see if it works