AnsweredAssumed Answered

OnObjectValidate Script Trigger

Question asked by Frinholp on Mar 15, 2011
Latest reply on Mar 16, 2011 by Frinholp


OnObjectValidate Script Trigger


I am trying to use the OnObjectValidate script trigger to perform a script if a validation error occurs.

I have set a field to validate unique values only.

This following script is attached to that field's OnObjectValidate script trigger.

Set Error Capture [On]

If [ Get (LastError) = 504 ]

Show Custom Dialog [ "My Dialog" ]

Exit Script [FALSE]


My Script is triggered when a non-unique value has been entered in the field but the IF condition is never met. therefore the native uniqueness validation dialog is displayed.

What am I doing wrong?

Thanks in advance