Anyone know if it's possible to create a field tha...
# general
s
Anyone know if it's possible to create a field that only accepts unique values?
m
I think natively the only field that enforces unique values is the Name or ID field on custom records. You could certainly script a solution for any other field though.
s
That’s what I was thinking. I saw an older article by Marty that I think would apply https://blog.prolecto.com/2015/03/13/how-to-enforce-unique-names-on-netsuite-custom-records/
m
Yeah, that looks pretty much like what I was thinking with a scripted solution. It's too bad that there's not a native option on all custom fields though, it would be rather helpful.
c
I've always just done a quick search if I needed something like this before I allowed the save.
k
I wrote a script from a suitescript article for a client to do that.
(in the help center)
s
Saw a video on LCS about validating fields for unique value by simple workflow
k
wait WHAT?!
c
But then you have to have a workflow 😞
a
depends on your situation but a partial solution could be to create a custom view which would highlight duplicated records in the list and then a user could take some actions.
m
External ID is also enforced to be unique. If you aren't already using it, you might be able to use a workflow that copies the custom field to external id