I'm trying to obtain fields' value from a variable of type VARIANT of which I know the table ID (the type of record)...but I don't want to declare many variables (one for each type of record in Navision) and then use EVALUATE [-X
I want to write flexible code, that can manage any type of record and read fields values (at least text, integer, decimal and bool )
Is it possible in some other way? And how? #-o
I tried also to use FORMAT(variantVar) and use fileds length and offset to get values but it seems not to work.... I get values but the offset is not correct...
Please help me!!!!!!!! ](*,) ](*,)
Kiki
0
Comments
Yes but the problem is that I have not these record in the database... :-k
I want t use the data online of the Rec variable, check these data. If all mandatory fields (listed in a configuration table) are filled in then I'll insert the record in the database otherwise I'll give an error message.
There is no reason not to use RecordRef, even if record is not inserted in database. Use RecordRef.GetTable([Record of any TableID]) (as far as I remember)...
http://navisionfreak.blogspot.com/
Justas Janauskas
testtable(variant,tableID);
if TableID = 27 then begin
ItemRec := variant;
if ItemRec."No." = '' then
exit('Item No is required');
end;
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
RIS Plus, LLC