Macro sc_exit() not work in event onAfterUpdate

Hi,

I’m trying to use macro in the event onAfterUpdate:

sc_commit_trans();
sc_exit();

The transaction work fine, I mean, the database is updated, but the form is not closed. The same code is used on onAfterInsert and work fine, I mean, the for is closed and back to the GRID that call initially, but in event onAfterUpdate keep like screenshot:
[ATTACH=CONFIG]n70089[/ATTACH]

Thanks for your comments.

AYMG

Captura de pantalla 2016-07-21 a las 0.48.54.jpg

Dear all,

In order to help to anybody that have this problem, I solve in onAfterUpdate method, by this way:

sc_commit_trans();
$url_sal = “GRID_FIN_saldos”;
if (isset($_POST['nmgp_parm_acum '])) {
$ur_sal = $_POST['nmgp_parm_acum '];
}
sc_redir($url_sal);

Regards,

How do you call this form. Is easier to set the form to close after processing (on Navigation options)

Hi Giu,

I call this form from a GRID with a icon with enlace. When I open the form, I need to do some checks to know if need edit or insert, them, first time I need to reset app and modify the mode, UPDATE or INSERT.

Thanks for your comment.

AYMG