Hi,
I have a new field "Team code" in table 13. But, the values are not getting populated in the new table "TeamSalesPerson".
PF the code below...
Team Code - OnLookup()
IF Code <> '' THEN
RecTeamSalesPerson.SETRANGE(RecTeamSalesPerson."Salesperson Code",Code);
IF RecTeamSalesPerson.FINDFIRST THEN BEGIN
IF (FORM.RUNMODAL(FORM::"Teamwise Salesperson List",
RecTeamSalesPerson,RecTeamSalesPerson."Salesperson Code") = ACTION::LookupOK) THEN
"Team Code" := RecTeamSalesPerson."Team Code";
END
ELSE
IF (FORM.RUNMODAL(FORM::Teams,
RecTeam,RecTeam.Code) = ACTION::LookupOK) THEN BEGIN
"Team Code" := RecTeam.Code;
RecTeamSalesPerson.INIT;
RecTeamSalesPerson."Team Code" := "Team Code";
RecTeamSalesPerson."Salesperson Code" := Code;
RecTeamSalesPerson.INSERT;
END;
:-k
With warm regards,
Thankesh
***Learn to lead***
0
Comments
When you do a FORM.RUNMODAL you don't see any values to select from, or after you select a value, you don't see any changes being made on the salesperson rec?
I would recommend indenting your code for legibility. Personally, I like to do it like this. Even though it causes small problems for merging..... [-X
Thankesh
***Learn to lead***
Thankesh
***Learn to lead***
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Thankesh
***Learn to lead***