Another nice trick: If you know the field numbers of the table but not surely the field names, you can write your code based on the field numbers: SalesLine.SETRANGE(Field1,SalesHeader.Field1); SalesLine.SETRANGE(Field3,SalesHeader.Field3); If you save and close this code and open the object in Design...