Hi. We have a custom field called “custitem_no” on our inventory items. We need that to be unique across all items (empty is fine though). Can someone help me write the UE script to prevent duplicates?
b
battk
10/03/2023, 9:37 AM
if you dont expect 2 items to be saved at the same time, then you can get away with a before submit entry point that does a search or query on items to make sure your items's custitem_no doesnt exist yet. if it does, throw an error
battk
10/03/2023, 9:38 AM
if you need it to work with concurrent saves, then i recommend instead creating a custom record with an external id set to the custitem_no
battk
10/03/2023, 9:39 AM
rely on the external id instead to guarantee uniqueness
battk
10/03/2023, 9:41 AM
will require logic to find the original custom record and edit it if the custitem_no changes