This is my code in onAfterInsert:
sc_lookup(rs, “SELECT LAST_INSERT_ID()”);
$new_r_id = {rs[0][0]};
sc_commit_trans();
// Redirect
sc_redir(gris_application, glo_main_shift_id=$new_r_id, ‘_self’);
The problem is that I do not get the last insert ID, but another value. If I do not use “sc_commit_trans();”, I will get my last insert ID, but the form doesn’t insert…