You can use electronic invoicing in Microsoft Dynamics AX to send electronic invoices to public sector organizations in OIOXML format. This format has been required in Denmark since February 1, 2005, and is expected to be extended to other European Union countries/regions over time.

Each public sector organization is assigned a European Article Number (EAN) location to facilitate the handling of the invoices. You assign this number to the customer account in Microsoft Dynamics AX.

The electronic invoice that you send to your public sector customers includes required information, such as the EAN number of the public sector customer, and the order number, contact person, dimension account number, and address information. Schematron validation rules are applied from within Microsoft Dynamics AX when the invoice is generated to help ensure that the correct information has been entered. If errors are found, you can correct them before you submit the OIOXML files to the value-added network (VAN) service for delivery to the public sector organizations.

Within Microsoft Dynamics AX, the Application Integration Framework (AIF) is used to generate XML files for the invoices. The resulting files are then processed using XML transformation files to produce the invoices in the required OIOXML format. You can set up batch processing for your invoices to automate this process.

If a customer has included a dimension account when placing an order, the customer is legally entitled to withhold payment until the dimension account is included on an invoice. You can specify the dimension account for either an invoice header or for the invoice lines.

Prepare to configure OIOXML electronic invoicing

Before you begin, be sure that Microsoft Dynamics AX is installed, the license key for AIF is activated, and the configuration key for Denmark is selected.

  1. Insert the Microsoft Dynamics AX DVD and find the following files:

    • \\DVD\Support\DK\eProjectInvoice.xsl

    • \\DVD\Support\DK\eSalesInvoice.xsl

  2. Set up the following folder structure in a shared location that is accessible from the Application Object Server (AOS) computer and from any client computers that are used as batch servers in your system:

    • \\Server\OIOXML\Project\Error

      \\Server\OIOXML\Project\Processed files

      \\Server\OIOXML\Project\Source

      \\Server\OIOXML\Project\Target

      \\Server\OIOXML\Project\XSLT

    • \\Server\OIOXML\Sales\Error

      \\Server\OIOXML\Sales\Processed files

      \\Server\OIOXML\Sales\Source

      \\Server\OIOXML\Sales\Target

      \\Server\OIOXML\Sales\XSLT

    The folders are used as follows:

    • Error– Folder to save error messages that are generated during the transformation of the XML file into OIOXML.

    • Processed files– Folder to save documents after they have been processed. The documents are moved from the Source folder to this folder.

    • Source– Folder to save the XML file that is generated by Microsoft Dynamics AX.

    • Target– Folder to save the OIOXML file after the XML file has been processed.

    • XSLT– Folder to contain the eProjectInvoice.xsl or eSalesInvoice.xsl file.

  3. Locate the files from step 1 and copy them to the locations specified in the following table.

    File

    Location

    eProjectInvoice.xsl

    \\Server\OIOXML\Project\XSLT

    eSalesInvoice.xsl

    \\Server\OIOXML\Sales\XSLT

Set up company information for OIOXML electronic invoicing

Complete this procedure for each company that you will use to generate electronic invoices.

  1. Click > > .

  2. On the tab, enter the company registration number for your company in the field. Close the form.

  3. Click > > > .

  4. Be sure that the value in the field for the country/region that is used for electronic invoicing (for example, Denmark) complies with the two-character ISO standard. Close the form.

  5. Click > > .

  6. Be sure that the value in the field for the currency code that is used for electronic invoicing (for example, DKK for Danish Kroner) complies with the three-character ISO standard. Close the form.

  7. Click > > > > .

  8. Set up the following job titles, and then close the form.

    • Bogholder

    • Budgetansvarlig

    • Indkøbsansvarlig

    • Rekvirent

  9. To set up units, click > > > .

  10. Set up the units according to the United Nations Centre for Trade Facilitation and Electronic Business Information Content Management Group (UN/CEFACT ICG) standards, if required for your organization.

Set up customer accounts for OIOXML electronic invoicing

Complete this procedure for each public sector organization for which you are required to submit invoices in electronic format (OIOXML).

Note Note

This procedure assumes that the configuration key for Denmark is selected.


  1. Click > Common Forms> .

  2. Select an account.

  3. Click the tab.

  4. In the field, enter the 13-digit European Article Number that is assigned to the public sector organization.

  5. Click the tab and verify the address information for the primary address. Be sure that information is included in the , , , and fields.

  6. Click > and select the contact person that corresponds to the selected customer account.

  7. On the tab, select one of the following titles: Indkøbsansvarlig, Bogholder, Budgetansvarlig, or Rekvirent.

  8. Close the form.

  9. In the form, click the tab. Select a contact in the field and close the form.

Set up AIF for OIOXML electronic invoicing

Use this procedure to specify the Application Integration Framework (AIF) settings that are required to generate OIOXML invoices. Complete this procedure for each company that you will use to generate OIOXML invoices.

For more information about setting up AIF, see "Configuring and managing AIF" in the Server and Database Administration Guide.

  1. Click > > > .

  2. In the field, select . Close the form.

  3. Click > > > .

  4. Select the company that you will use to generate the OIOXML invoices. Set up a local endpoint.

  5. Click > > > .

  6. Select the AifFileSystemAdapteradapter class and enter a name. This adapter is used to create and save the XML file. Select the check box. Close the form.

  7. Click > > > .

  8. To create a channel for sales invoices, complete the following steps.

    1. Enter a channel identifier, such as EInvoiceSales, and a name.

    2. Select the check box.

    3. Select the file system adapter that you set up in step 6.

    4. In the field, select .

    5. In the field, enter the path to a folder where the XML files are saved (the \\Server\OIOXML\Sales\Source folder that you created in step 2 of the "Prepare to configure OIOXML electronic invoicing" section).

  9. To create a channel for project invoices, repeat step 8. Use EInvoiceProjectas the name enter the path to the \\Server\OIOXML\Project\Source folder. Close the form.

  10. Click > > > .

  11. If necessary, click to display a list of services and operations.

  12. Select the SalesSalesEInvoiceServiceservice and select the check box.

  13. Select the ProdProjEInvoiceServiceservice and select the check box. Close the form.

  14. Click > > > .

  15. Select the SalesSalesEInvoiceService.readaction and verify that the check box is selected.

  16. Select the ProdProjEInvoiceService.readaction and verify that the check box is selected. Close the form.

  17. Click > > > .

  18. In the field, enter an identifier, such as SalesOIOXML, and a name. In the field, enter or select the identifier that you entered in step 4. The local endpoint indicates the company that is used to generate the electronic invoices.

  19. In the field on the tab, select the channel that you set up in step 8 or 9, such as EInvoiceSales. In the field, select .

  20. On the tab, select the public sector organizations (customer accounts that have an EAN number assigned). For more information about setting up customers, see Customers (form).

  21. On the tab, select the user or group who can use the selected endpoint.

  22. Press CTRL+S to save the endpoint.

  23. Click . In the form, specify the action ( SalesSalesEInvoiceService.reador ProdProjEInvoiceService.read) to use for the selected endpoint. In the field, select , and in the field, select .

  24. Press CTRL+S to save the endpoint action policy.

  25. In the form, click . In the form, click the tab.

  26. In the field in the field group, select . This is required to be able to generate invoices for free text invoices. In the other fields on the tab, select .

  27. Click the tab. In the field in the field group, select . In the other fields on the tab, select .

  28. Close the form.

  29. In the form, click .

  30. In the form, click .

  31. In the form, click > to select all fields.

  32. Repeat steps 17 through 31 to set up an endpoint for project invoices.

  33. In the form, select the check box for both endpoints, and close the form.

Set up batch processing for OIOXML electronic invoicing

Use this procedure to set up batch processing for OIOXML electronic invoices for public sector organizations. Complete this procedure for each company that you will use to generate OIOXML invoices.

Note Note

For more information about setting up and using batch processing for AIF, see "Configuring and managing AIF" in the Server and Database Administration Guide.


  1. Click > > .

  2. Create a job for sales outbound electronic invoices and another job for project outbound electronic invoices.

  3. Select the sales outbound electronic invoices batch job that you created in step 2.

  4. Click .

  5. In the form, add three tasks that use the following class names to the batch job:

    • AifOutboundProcessingService

    • AifGatewaySendService

    • EInvoiceXSLFileTransform

    Note Note

    Set up the tasks in the order shown. For ease of maintenance, use numbers in the descriptions of the batch tasks, such as 1 AIF Outbound, 2 AIF Gateway, and 3 EInvoice. Select the same company for each task.


  6. Select the task that uses the EInvoiceXSLFileTransformclass name.

  7. Right-click in the field and select Go to the Main Table Form. Create a batch group that will be used to process the sales invoices or project invoices.

  8. Click the tab. Select a server and move it to the list.

  9. Close the form.

  10. In the form, select the batch group that you created in step 7.

  11. Press CTRL+S to save the batch task.

  12. With the task that uses the EInvoiceXSLFileTransformclass name still selected, click .

  13. Specify the location of the folders that you created in step 2 of the "Prepare to configure OIOXML electronic invoicing" section. For the path, select the eSalesInvoice.xsl or eProjectInvoice.xsl file.

  14. Click OKto close the form.

  15. In the form, set up the order in which the batch tasks will run.

    1. On the tab, select the batch task that uses the AifGatewaySendServiceclass name (the second task). You will set up a condition for this task to run when the batch task that uses the AifOutboundProcessingServiceclass name (the first task) has ended.

    2. Click anywhere within the grid in the lower pane of the form.

    3. Press CTRL+N to create a new condition.

    4. In the field, select the batch task that uses the AifOutboundProcessingServiceclass name.

    5. In the field, select .

    6. In the upper pane, select the batch task that uses the EInvoiceXSLFileTransformclass name (the third task). You will set up a condition for this task to run when the batch task that uses the AifGatewaySendServiceclass name (the second task) has ended.

    7. Click anywhere within the grid in the lower pane of the form.

    8. Press CTRL+N to create a new condition.

    9. In the field, select the batch task that uses the AifGatewaySendServiceclass name.

    10. In the field, select .

  16. Close the form.

  17. In the form, select the sales outbound electronic invoices batch job.

  18. Click , set up the batch job execution, and click OK.

  19. Select the project outbound electronic invoices batch job that you created in step 2.

  20. Repeat steps 4 through 18 to set up the batch job for project invoices.

  21. In the form, select the batch job for sales invoices, click > , and select .

  22. Select the batch job for project invoices, click > , and select .

See Also