Skip to main content
Topic: Redirect after delete record on list view (related table) inside view (parent) (Read 1374 times) previous topic - next topic

Redirect after delete record on list view (related table) inside view (parent)

Hello everybody,

I have one view page (example: invoice) with a list view component (ex. invoice items). When I delete an item it redirects to Items List page. I would like to return to Invoice View page. Any ideas?

Have a nice day!

Re: Redirect after delete record on list view (related table) inside view (parent)

Reply #1
@Euder‍ you can do a redirect on action after delete, but you need to store the invoice ID globally so that you can use the ID to do the redirect back to the invoice page. 

Re: Redirect after delete record on list view (related table) inside view (parent)

Reply #2
Hi @willvin !

I tryed to define in the event Before View of the invoice with the following code:

Code: [Select]
global $inv_id;
$inv_id = $rec_id;

And configured the redirect after a delete on Delete page of inv_items to: invoice/view/$inv_id. But it didn´t work.

Thanks.

 

Re: Redirect after delete record on list view (related table) inside view (parent)

Reply #3
I realize that I am changing pages, so It is better to ser cookie.