5 Replies Latest reply on Jan 16, 2014 10:29 AM by philmodjunk

    "You must enter a unique value." Script Error

    KenHoopes

      Title

      "You must enter a unique value." Script Error

      Post

           Please assist,

           I have a script that captures global fields and sends them to another table, then blanks them out. The other table has a unique validation rule, so when the script runs if the serial number is not unique, i get an error. That is what I would expect, but unfortunately the layout changes to the second table (navigation controls are unavailable in this project) and the user then cannot get back to the form to fix it, unless they choose revert. that means the project breaks if they click ok.

           Is there a way for the script to check for validation before attempting to commit the record, and how will that affect performance?

           I guess the other option would be for the script not to check for validation, but for the second layout to have a script that pops an error, then auto xfers them back to the first layout. this script could execute on open i guess, and would need a step to stop the first script. This would enable me to use standard validation.

           Any advice is appreciated.