Hello everyone
I created a table that has fields "Employee No.", "Type" where options are: Employee and Family member, "Relative Code" and "Name".
I need to automatically fill Name with a name from table 5200 if type :: Employee and fill it with the name of the relative from table "Employee relative" if type :: Family member.
What code and in which trigger should I write to make this happen?
Please help,
This is of great importance to me and none of my codes worked
Answers
The code would have to have an if statament, something like below;
IF "Relative Code" <> '' THEN
IF Type = Type::"Family Member" THEN BEGIN
EmployeeRelative.GET("Relative Code");
Name := EmployeeRelative.Name;
END ELSE BEGIN
Employee.GET("Relative Code");
Name := Employee.Name;
END;
ELSE
Name := '';
My Dynamics NAV Blog: olofsimren.com
My Google Plus Profile
Naviona - My Dynamics NAV Partner