bradleyboggs

OnObjectExit Script Preventing Portal Row Delete

Discussion created by bradleyboggs on Sep 5, 2013
Latest reply on Sep 6, 2013 by LaRetta

Hi there,

 

Thank you in advance for your help! In one of my layouts, I have a portal that has an "OnObjectExit" script trigger that triggers a script designed to validate the data. The only caveat to that is that it prevents the "Delete" button present on each portal row from working (this is just a simple button with the "Delete Portal Row" script step. Button is present on each portal row.

 

Here's the script that is run OnObjectExit:

 

If [ not IsEmpty (InvTrans::UnitsIn) ]

Perform Script [ “Validation_InvTrans_InOut” ] <------------ This script just checks to make sure only one of two fields has a value

Else If [ not IsEmpty (InvTrans::UnitsOut) ]

Else

Show Custom Dialog [ Title: "Correct Transaction Amount"; Message: "ATTENTION - You must include either an IN quantity or an OUT quantity. Please correct."; Default

Button: “Go Back” , Commit: “No”; Button 2: “Delete Trans” , Commit: “No” ]

Set Variable [ $m; Value:Get ( LastMessageChoice ) ]

If [ $m = "1" ]

Go to Object [ Object Name: "UnitsIn" ]

Enter Browse Mode

Halt Script

Else If [ $m = "2" ]

Delete Portal Row

End

 

The deletion that happens via the dialog works fine - it's just this script trigger/script that is preventing the normal deletion of portal rows.

 

Any help would be greatly appreciated!

 

-Bradley

Outcomes