Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Set or Change InvoiceId

Posted on by Microsoft Employee

Hello everyone,

My team and I are currently working on a project where we are onboarding several new locations into our Dynamics AX 2012 R2 environment.

We would like to historically add sales orders / invoices into AX to represent sales orders / invoices from legacy systems used by these new locations.

With that being said, I have exposed some X++ code via an AIF inbound port to dynamically create sales orders, sales lines, and post the sales order to create an invoice.

However, we would like to use the original invoice number from the legacy system once the invoice has been 'recreated' in Dynamics AX.

Can anyone think of a way to either:

1. Set the invoice number to be used before invoicing the sales order so it uses that number

2. Reliably Update all of the related records after the fact such as InvoiceId on CustInvoiceJour, CustInvoiceTrans, Invoice on CustTrans ... etc?

Any and all help on this would be greatly appreciated.

Thank you,

*This post is locked for comments

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Set or Change InvoiceId

    Hi,

    Why don't you write the old invoice number into a new field or even an existing one such as the customer reference field? To me this seems safer and easier than trying to change or modify the AX invoice number.

    Best regards

    Ludwig

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans