I don't suppose anyone has a quick script to preve...
# suitescript
r
I don't suppose anyone has a quick script to prevent save on item records if a custom field value is going to be duplicated? I found this and I tried to take that and tweak it to my use case, but have been unsuccessful so far and as I'm reading it, it's not preventing save of the record, it's just performing an action (closing the SO) if it finds the dupe. Seems like this should be simple, but I am not a scripter.
c
To prevent saving a record on beforeSubmit, you need to throw an error. Also, any script that prevents saving a duplicate based on a field value needs to filter out the record that's being saved from whatever search or query is used to detect duplicates.