Hi I want my form to go back to Editing (Return after inserting) when in INSERT Mode
and I want my form to exit in UPDATE Mode (Exit Application)
To control this behavior I use a GLOBAL variable and test it’s value in onScriptInit, depending of it’s value I want to use sc_exit() to Exit the Application. The problem is that it’s crash there with the message Processing
// onScriptInit
if ([exit_form_on_save] == true) {
[exit_form_on_save] = false;
sc_exit();
}
// onLoad
if ({ID} < 1) {
// Insert
[exit_form_on_save] = false;
} else {
// Update
[exit_form_on_save] = true;
}
Return after inserting is set to yes, everything else to no