"You must specify OIOXML Country Code"...

galmokgalmok Member Posts: 44
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?

Comments

  • MbadMbad Member Posts: 344
    It is a setup in the country table for when post and printing in the danish version. You will need to specify what the outcomming XML file should contain in said field
  • galmokgalmok Member Posts: 44
    I assume you are referring to the Countries table? If so, then DK is defined (and has been used without problem earlier).

    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?
  • galmokgalmok Member Posts: 44
    Could this problem be related to "Shortcut Dimension 1 Field" failing to be set during SalesHeader creation?

    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. :-(
  • MbadMbad Member Posts: 344
    Just to make it clear. You zoomed and found the field "OIOXML Country Code" in your country table and it was filled with 'DK'?

    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.
  • galmokgalmok Member Posts: 44
    I finally found the "OIOXML Country Code" field in the Countries table. It was hidden which is why I missed it.

    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).
  • galmokgalmok Member Posts: 44
    After having filled the OIOXML Country Code, I receive this error after having used Post and Print (which did post and print):

    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.
  • MbadMbad Member Posts: 344
    The OIOXML is elctronic invoices to the governmental departments. If you want to know what the fields should contain you should look at the homepage for Økonomistyrelsen (oes.dk) and there is a validator for the generated XML file here http://xmltools.oio.dk/oioonlinevalidator/
    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
  • MbadMbad Member Posts: 344
    You need to choose one of the options in the peyment terms table. Again you should be able to find the information by looking at the website or contacting oes. If there is a problem with what it maps to you can choose one and look at the file which tag it is inserted into before you contact oes.
Sign In or Register to comment.