Announcement

Collapse
No announcement yet.

Record not saved when using sc_redir in onAfterUpdate event

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Record not saved when using sc_redir in onAfterUpdate event

    Hi,

    I have a form which adds records to another table in the onBeforeUpdate event and this works fine. The data from the form is saved in the database. When I add a sc_redir in the onAfterUpdate to another form (a control form to ask the user to create an invoice autmatically), the data in the form is not saved. To me it looks like a bug, because data should be saved already, right?

  • #2
    No this is not a bug, you are missing the sc_committrans because you do a sc_redir before that. So before doing the sc_redir apply a sc_committrans(); in your code and the update is saved.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Thanks, this worked (is was sc_commit_trans(); )

      Comment

      Working...
      X