How to redir to the list after delete the record

I want to sc_redir to the grid after deleted the record in the form.

I tried the after_delete event, it doesn’t work. even can’t delete the record actually.

I tried the application -> navigation->Exit Application, When a user saves it, it will return the previous grid too, user doesn’t like it.

Is there a new idea only after deleting action sc_redir to the grid?
Thank you, guys.
I am looking forward to your reply.

sc_commit function before sc_redir function

hi Omoya,
Thank you for your reply, could you explain how to use this function? I can’t find this one in manual. I tried sc_commit() sc_commit(‘connection’) sc_commit_trans(“connection”) in after_delete event.
but all these doesn’t work.
Appreciate your help.
Jonathan

Hi jonathanwang,
I tried what omoya said, and it worked

On AfterDelete event I put this 2 lines:

sc_commit_trans();
sc_redir(grid_Table);

Regards,
Mauricio

I had the same problem and used sc_redir©. and it works

hi Dossamau,
Thank you for your help. This way will works if only master record, but I have detail table to delete. It still doesn’t work.
I create a new button name “Delete” and delete the detail table and master table record, then sc_redir(grid_table);
This solution works well so far.
Thank you guys help.
Jonathan