Hi In a form field want to fix not allow duplicates(Unique) at runtime. Plese support me. Thanks in advance sunil kumar
You can define an unique index in the table level.
or you can override the validate write of the form or table.
write an exist method in the table - see inventTable for more reference.
and in the validate write method
if(Table::exists(table.fieldvalue))
ret = checkFailed(“The field value already exists”);
return ret;
Hi Kranthi,
I am having similar problem. Navision 5.0 MS SQL 2008
I would like to have unique field(Custom Field ‘External Id’ which is text field) on Item table.
What I’ve done so far:
- in Navision Created new Key in Item table through → Object Designer->Item->Design->Keys
- in MsSQL2008 set this key from index to unique
However when I insert new record with same External Id it doesn’t comes with any error message and simply creates this record. Which ends up with 2 duplicated entries.
Could you tell me what I am doing wrong?
Regards Ondrej