Hi
After having imported a few hundred orders, we want to post and print them, but Navision did not do so. Trying to post and print 1 order by itself resulted in this error:
You must specify OIOXML Country Code in Country Code='DK'.
We are quite pussled why this error popped up as we imported the orders pretty much like we did earlier. Apparently we have forgot something.
The orders were created like this:
First the customer was inserted in the Customer table. Then a Sales Header was created and last, the Sales Lines were added. Everything looks ok and we have hundreds of orders waiting to be posted and printed.
Can anyone suggest something we have missed?
0
Comments
If this isn't the table you are referring to, could you be a bit more specific, please? :-)
Also, having checked all fields in the Sales Header, there is not field called Country Code. I guess it (the error) refers to the Customer table?
I create the Sales Header like this:
SalesHeader.INIT;
SalesHeader."No.":='';
SalesHeader.VALIDATE("No.");
SalesHeader.VALIDATE("Document Type",SalesHeader."Document Type"::Order);
SalesHeader.VALIDATE("Sell-to Customer No.",impNo);
SalesHeader.VALIDATE("External Document No.",impExternalDocumentNumber);
SalesHeader.VALIDATE("Shortcut Dimension 1 Code",'EPJ2007');
SalesHeader.INSERT(TRUE);
impNo holds the customer number and impExternalDocumentNumber the reference number. The problem during import was that the Shortcut Dimension 1 Code wasn't being set to EPJ2007 for any SalesHeader and we had to set them after the import (set them using dataport code).
We still have this Country Code problem and I really can't find a solution to it. :-(
If the field isnt there you need to upgrade your OIOXML to the latest version.
If the field is there and its filled you will need a programmer to run the code with the debugger on.
And the field is indeed empty for all defined countries. The error makes a bit more sense now.
Are there any rules to what the OIOXML Country Code field should contain or am I free to use whatever I want? I tried googling it, but didn't find an answer.
There is a big but, though:
A manually created Customer entry and a manually created Order will Post and Print without the OIOXML error. How come? It seems to be related to the "Shortcut Dimension 1 Code" field (I changed that field on all Orders after they were created).
OIOXML Code must not be in Payment Terms Code='14D'.
But the OIOXML Code field in the Payment Terms Code table is empty. I don't understand why Navision gives this error/warning.
Also there is a setup under Sales & Receivables to define the folder.
NB the file is only created when you post AND print.
Good luck