I have been looking at contact lookup from the Sales Header and saw
xRec = Rec;
I have copied the code to my table however, I do not understand this line.
Can someone explain why this is here.
Cheer :?
IF ("Sell-to Customer No." <> '') AND Cont.GET("Sell-to Contact No.") THEN
Cont.SETRANGE("Company No.",Cont."Company No.")
ELSE
IF "Sell-to Customer No." <> '' THEN BEGIN
ContBusinessRelation.RESET;
ContBusinessRelation.SETCURRENTKEY("Link to Table","No.");
ContBusinessRelation.SETRANGE("Link to Table",ContBusinessRelation."Link to Table"::Customer);
ContBusinessRelation.SETRANGE("No.","Sell-to Customer No.");
IF ContBusinessRelation.FINDFIRST THEN
Cont.SETRANGE("Company No.",ContBusinessRelation."Contact No.");
END ELSE
Cont.SETFILTER("Company No.",'<>''''');
IF "Sell-to Contact No." <> '' THEN
IF Cont.GET("Sell-to Contact No.") THEN ;
IF FORM.RUNMODAL(0,Cont) = ACTION::LookupOK THEN BEGIN
xRec := Rec;
VALIDATE("Sell-to Contact No.",Cont."No.");
END;[/b]
0
Comments
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!