AX / D365FO – Attach documents (in base64 format) in Electronic Invoice XML files

To attach a document in XML electronic invoices just follow these steps :

  • In this example we’ll create an Project e-invoice
    First be sure the customer has these 2 flags enabled in the E-INVOICE section :
    – eInvoiceregister
    – einvoice attachment

  • Now create a Project
  • Create an item requirement order
  • Post the Packing slip
  • Return to the project and create an Invoice Proposal (Remember to insert an Invoice Template)
  • In the invoice proposal add an attachment
  • Add a new file type attachment
  • Choose a file
  • In the Restriction section select “External
  • Save it
  • Now post the invoice proposal
  • Return in your project and select “Invoice journals”
  • Here is your newly created invoice
  • Go to “Project management and accounting” > E-Invoices > Electronic invoices
  • Select your invoice and click “Create”
  • Once created, click on “Export”
  • Open the xml file
  • In the last XML section you’ll notice that the document has been written in BASE64 format

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s