So you see on line 30 `if(duplicates.length == 0) ...
# suitescript
j
So you see on line 30
if(duplicates.length == 0) return true;
that means that the record can be saved. I think you need to change return alert() on line 33 to be just be an alert and then after that add a return false. Have a read up on the saveRecord function for further details but it's basically a validation method, return true if you want to save, return false if you don't want it to save.