Having trouble figuring out the right way to do this.
I sometimes pass an invoice_id into the order entry page. This sets a temp var which is used by the app to load up that invoice. Works fine.
I would also like to have the URL reflect an invoice_id created/opened from within the app. I have tried variations of this:
But what happens is currentInvoice.value and the URL briefly change to show everything correctly and then both clear.