I have strange problem, when make connection with table Customer:
IF Klantrec.GET("Issued Reminder Header"."Customer No.") THEN;
Faxnummer := Klantrec."Fax No.";
Then i get the fax number from that table, but when i make a connection with ship-to address table
IF Shiprec.GET("Issued Reminder Header"."Customer No.") THEN;
Faxnummer := Shiprec."Fax No.";
then faxnummer will stay empty.
What can be the problem?
0
Comments
And afaik reminder in NAV standard doesn't work for Ship-To Address.
RIS Plus, LLC
With get you need to fill in the key's with a value and you're only using customer#
http://www.BiloBeauty.com
http://www.autismspeaks.org
http://www.BiloBeauty.com
http://www.autismspeaks.org
in your example you have a ";" after THEN, which terminates the IF-THEN statement.
Soren
http://gotcal.com
RIS Plus, LLC
I know only one field. So how do i use this Findfirst then in this situation?
What if a customer has 10 ship-to's and each has a different fax #.
Which one would you like to get?
Usually when a customer has multiple ship-to's then the information on the main customer card is usually the "main office".
Is the fax # on the main customer card not the one you're looking for?
Does this "Issued Reminder Header" not have a ship-to code?
Perhaps adding a lookup to the ship-to address table can help.
http://www.BiloBeauty.com
http://www.autismspeaks.org
I constructed some code which had to do that, but that isnt working because of the two keys in one table. As understand from your answers. Thnx by the way for that.
This is the code i had:
CLEAR(Shiprec);
IF Shiprec.GET("Issued Reminder Header"."Customer No.") THEN;
IF Shiprec."Billing Address" = TRUE THEN BEGIN
Faxnummer := Shiprec."Fax No.";
END ELSE BEGIN
CLEAR(Klantrec);
IF Klantrec.GET("Issued Reminder Header"."Customer No.") THEN
Faxnummer := Klantrec."Fax No.";
END;
Because this wasnt working i made it simpler to see which part of the code worked and where i could found the problem.
If the customer no. exist in the table ship-to address and it is a billing address then it has to look if the issued reminder header.address is the same as ship-to address. When it is it has to take this fax number when it is not it may take the fax number of the customer table.
In code it has to look something like this (the green part is working), but the red one isnt:
CLEAR(Shiprec);
IF Shiprec.GET("Issued Reminder Header"."Customer No.") AND //customer no. needs to be the same and exits
(Shiprec.Address = "Issued Reminder Header".Address) AND //the extra link to get the right address
Shiprec."Billing Address" = TRUE THEN BEGIN //third link to look only at billing address
Faxnummer := Shiprec."Fax No.";
END ELSE BEGIN
CLEAR(Klantrec);
IF Klantrec.GET("Issued Reminder Header"."Customer No.") THEN
Faxnummer := Klantrec."Fax No.";
END;
Is this more in the right way?
Pargesoft
You need to get some help from a senior developer, get the training material, and study for the certification exams, which is a good start. I'd also recommend David Studebaker's books on development and Mark Brummel's book on application design.
RIS Plus, LLC