How to return main grid list after delete the master record

A grid link with a master-detail form.
The master form will jump to the wrong record when I delete a master record.
the form will return back to the grid, if Navigation/Exit Application option checked. But insert a new master record will return the grid too. I have to reopen the master form to append the detail records.
I want the form to stay in the edit mode when I insert a new master record.
What is your guy’s solution to this issue?

Had the same problem and was hoping to find the solution here…

Anyway, solved the problem with:

OnAfterDelete Event:
sc_exit( c );

Just a one liner - to force the form back to the the previous grid application.

1 Like

Thank you for your suggestion.
The C in brackets means what?
I currently use sc_redir to redirect back to grid.
I tried OnAfterDelete event before, but record can’t be deleted. I don’t know why.
let me find time to try it again.
Thanks again.

Option Description
sc_exit() Returns to the previous application without display anything.
sc_exit(ok) Displays a window with an OK button and returns to the previous application.
sc_exit(sel) Doesn’t display the window with an OK button and returns to the current application, repeat the application select.
sc_exit(ref) It doesn’t display the window with an OK button refresh data and returns to the current application.
sc_exit(ok,ref) Same as the sc_exit(ref) function; however, display the OK button.
sc_exit(ok,sel) Same as the sc_exit(sel) function; however, display the OK button.

This option is only valid for Form and Control Applications.

Option Description
sc_exit() Doesn’t complete transactions in database.
sc_exit ( c ) Commit pending transactions.
sc_exit( r ) Rollback pending transactions.

1 Like

Thank´s a lot. This solved my problem