How set a field unique on a custom table ... ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2017 12:23 AM
Hi,
I have a custom table extending cmdb_ci.
There is a field (u_....), that I wand to set a unique, but when changing it in the table dictionary, the value will not be saved. No message.
If there are duplicate records, I get the message, that setting unique requires duplicates to be removed first .... (but when removed .. nothing happens).
THnx
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2022 01:13 AM
just add a business rule before insert - check if value there allready - if yes abort ...
Still do not get why this does not seem to work OOB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2022 07:08 AM
It seems it is a known issue since a long time.
Please refer below link:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0657669