Hello everyone … first of all … sorry for my poor english… I’m a newbie and i need a confirmation … Is it possible to stop a validate on a field : i have a variable Var 1, someone give me the Value of this variable(example TOTO), and if i do : customer.validate(“Customer Posting Group”,“Var 1”) the system return me an error. And i want to know if it is possible to test before validate the value if the Validate is OK without using a codeunit. PS : I thought that the instruction OK := customer.validate(“Customer Posting Group”,“Var 1”) do this but it wasn’t true, so …
Hi! You should explicitly check validity of the value. In this case it means that you should check if there is a field for value of “Var 1” in the table “Customer Posting Group”. regards, Anu
Hello … The problem is that i’m using a navision 3.60, and the type of variable RecordRef and FieldRef. The code is like this : //RefTableTemp Type = RecordRef //RefChampTemp Type = FieldRef CLEAR(RefTableTemp); RefTableTemp.OPEN(NumTable); RefTableTemp.RESET; RefChampTemp := RefTabletemp.FIELD(NumField); RefChampTemp.value := ValueTemp ; RefChampTemp.VALIDATE(ValueTemp); where NumTable, NumField and ValueTemp can be everything in Navision. And as i said before, i thought that OK := RefChampTemp.VALIDATE(ValueTemp) can do this, but it wasn’t true.
Seems that it is possible to catch errors in database level(ie. primary key etc.), but not in code level, this way