GetEmailTableID(RecRef : RecordRef) : Text[80] CASE RecRef.NUMBER OF 36,110,112,114: BEGIN RecRef2.OPEN(18); FieldRef2 := RecRef2.FIELD(1); FieldRef2.VALUE := FORMAT(RecRef.FIELD(2)); //="Sales Header"."Sell-to Customer No." IF RecRef2.FIND('=') THEN BEGIN FieldRef := RecRef2.FIELD(102); EXIT(FieldRef.VALUE); END; END;
Comments
Just add the customer table as a local variable.
Object Manager
It's an option. But I don't want to declare a record variable, like Customer.
I want to link other tables as well in the same function, so make the function with as least variables as possible.
That's why I want to use a second RecordRef variable.
Maarten