Hi. I use Navision 3.70 and I have the following problem.
fref --> fieldref
ref --> RecordRef
Here's the code of a function of a codeunit. The function's arguments as
tableno and position.
ref_mod(tableno : Integer;position : Text [250])
ref.OPEN(tableno);
ref.SETPOSITION(position);
fref := ref.FIELD(1);
message(format(fref.value));
Here's the deal: if the field is the primary key,is shows its value. If it is any other field it shows its initial value ('' for string, 0 for option etc). I can't get the real value of the specific record. :evil:
Does anyone know why this happens? How can I get the real value?
PS. Here's a usual call of ref_mod :
ref_mod(9,'Code=const(ES)');
PS2. Thanks for reading this.
Katerina Passali
Exodus S.A.
www.exodus.gr0
Comments
Try using ref.FIND after your ref.SETPOSITION.
According to the help SETPOSITION only sets the values of the primary key and does not actually get any info out of the DB.
Hope it works
Thanks so much!
It worked!
Exodus S.A.
www.exodus.gr