Forum Discussion

ZVIBOCK's avatar
ZVIBOCK
Qrew Cadet
7 years ago

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

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

2 Replies

  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    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.
  • Thanks for your help I will try your solution and see if it works