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