sc_redir() after insert don't work

Hi all,

I make a new form for insert new record.
In after_insert event I would like to redir to another form.
If I insert some code in onAfterInsert event, SC7 redirect me to the new form but don’t insert new record!:mad::mad::mad::mad:
If I clear code in onAfterInsert event SC7 insert correctly new record.

Why?! Can someone help me ,pls?

It’s a bug between your ears … ;). Before you redirect to another form, you should SC tell, what you will do: save the record. Look at sc_commit_trans() for that …

The bug is that the search function on this forum isn’t presented clear enough. I lost count how many times this issue was posted.

Hhm, no. Look at this link (the examples at end). This also works here. Or, you can use Google: new record onafterinsert site:scriptcase.net/forum

Hello,

As Reinhard stated you have to commit the transaction before redirecting to a new page.

regards
Bernhard Bernsmann