I'm still finding trouble in using the table no function. Is it possible to get the RecId from a Record Type variable?
If you create a variable with Record Type = Record, then you know the Table No. because you defined it a design time.
Otherwise, you can use recVar.TABLENAME and lookup that TableName in the Object-table (is a system-table with No. 2000000001). There you have your Table No.
No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
Name DataType Subtype Length
Item Record Item
Object Record Object
Object.reset;
Object.setrange(Type,Object.Type::Table);
Object.setrange(Name,Item.TABLENAME);
Object.findfirst;
message(format(Object.ID));
Comments
I'm still finding trouble in using the table no function. Is it possible to get the RecId from a Record Type variable?
Otherwise, you can use recVar.TABLENAME and lookup that TableName in the Object-table (is a system-table with No. 2000000001). There you have your Table No.