sc_redir() stops any update working - can't be true!

Having spent 2 days on this, because I could not believe it to be a bug of this magnitude, I wonder if anyone can replicate this. It seems too basic. Take a form, put an sc_redir() on the onAfterUpdate event…and try to save it…the update does not happen. Just save the form, nothing fancy. The redirect will work but go back and see if your changes were saved. They were not in my case. 2 days or work around including sleep(1) to give the SQL time, javascript to avoid sc_redir altogether and a dozen other things. Am I doing something wrong or is this a bug?

Been double checking my theory. I am certain that if you want to save a form and then redirect to a list of forms then the the save will not work. Almost anything put in the Event “OnAfterUpdate” will stop the Update from happening. Anyone able to replicate this?

I’ve been there, I know the frustration. This behavior is by design :slight_smile:

You need to issue this command: sc_commit_trans(“Connection”)

SC explanation on below link.

https://www.scriptcase.net/docs/en_us/v81/scriptcase-macros/scriptcase-macros#sc_commit_trans

Yes commit trans wil do the job. My first mistake to

You are right. All fixed thanks. I see the reference to sc_commit_trans() in the sc_commit section now…maybe it should be in the sc_redir() section too!!!