OnAfterInsert Event processing Still Processed

Have a process that the user inserts a record and after sends the form results to users via email.
Pretty standard huh…
Well here is the thing…
it is in the OnAfterInsert event…
but it never inserted the record due to a field being mandatory in the database that wasn’t mandatory on the form…
Still sent the email, no records inserted…

any idea on how to verify that the record was inserted?
so I can wrap that email process into the verification…

And Yes it was throwing an error on screen, but Lusers see the email and ignored…

I was under the impression that the OnAfterIsert was an event that happened AFTER Inserting…

Thoughts?

Kevin

Try use the macro sc_commit() before you send the email…

well thats what makes no sense… why wshould i do that if it an AFTER INSERT Event??

http://www.scriptcase.net/docs/en_us/v9/manual/14-macros/01-general-view/#sc_commit_trans